In my Jenkins pipeline I try to build in the Maven Surefire Plugin so I can run Maven Test within the Pipeline and ignore the failure of the Test (so that the pipeline process can go on):
mvn clean deploy -Dmaven.test.failure.ignore=false
class org.codehaus.groovy.ast.expr.UnaryMinusExpression, with its value 'Dmaven.test.failure.ignore', is a bad expression as the left hand side of an assignment operator at line: 6 column: 51. File: WorkflowScript @ line 6, column 51.
oy -Dmaven.test.failure.ignore=false
^
Your command line call of Maven is interpreted as groovy command. This means that you made a syntax error in your groovy script.