I have a maven project in which I execute a windows .bat
file using maven exec plugin. The problem is that, even if the bat execution fails (i.e. exit code is -1) the build of the project is SUCCESS.
Here is my defined plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>run.bat</executable>
</configuration>
</execution>
</executions>
</plugin>
Please note that the same behave as expected if I execute it on Unix (i.e. execute .sh file and build fails).