Reputation: 331
I am using the exec-maven-plugin to run a windows batch script. The batch script runs in a separate process from my maven build. When my batch script throws an error, how can I stop my maven build with an error response?
Please find the maven exec plugin version details below:
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
Also, I am using maven 2.2.1
Upvotes: 2
Views: 956
Reputation: 13420
In order for the exec-maven-plugin to fail the build you have to throw an exception from the jar you are calling. The plugin will not fail the build based on a non-zero return code.
Upvotes: 1