java - Allow a maven exec during integration-test phase to make the build fail -


i've sniped following on pom.xml:

<plugin>  <groupid>org.codehaus.mojo</groupid>  <artifactid>exec-maven-plugin</artifactid>  <executions>   <execution>    <phase>integration-test</phase>    <goals>     <goal>java</goal>    </goals>   </execution>  </executions>  <configuration>   <mainclass>com.example.starttestmain</mainclass>   <arguments>    <argument>target/classes/local.testrun</argument>   </arguments>  </configuration> </plugin> 

while executes without problems, find return code ignored , there no way starttestmain tell build should fail.

i'm thinking propagating exception hoping maven take , stop build. however, fail if exec-maven-plugin ever configured in forkmode.

any cleaner options?


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -