J.Doe J.Doe - 3 years ago 201
Groovy Question

Failure at Maven clean deploy

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

However if I try to use the command I get following error:

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

I don't quite understand why it won't work, can anyone explain?

Answer Source

Your command line call of Maven is interpreted as groovy command. This means that you made a syntax error in your groovy script.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download