Yesterday, I had a test fail and fail out a build, but it didn't return to ant 
a bad return code.  Here's what I have:
 
Ant call to maven:
 
      <exec dir="${dir.app}" executable="mvn">
        <arg line="clean install"/>
      </exec>
 
Maven call to tests:
 
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <configuration>
                                        <includes>
                                                <include>**/*Test.java</include>
                                        </includes>
                                </configuration>
                        </plugin>

Build output indicating error:
 
     [exec] Tests run: 281, Failures: 0, Errors: 1, Skipped: 55
     [exec]
     [exec] [INFO] 
------------------------------------------------------------------------
     [exec] [ERROR] BUILD FAILURE
     [exec] [INFO] 
------------------------------------------------------------------------
     [exec] [INFO] There are test failures.
     [exec]
     [exec] Please refer to /app/path/to/target/surefire-reports for the 
individual test results.
     [exec] [INFO] 
------------------------------------------------------------------------
     [exec] [INFO] For more information, run Maven with the -e switch
     [exec] [INFO] 
------------------------------------------------------------------------
     [exec] [INFO] Total time: 1 minute 51 seconds
     [exec] [INFO] Finished at: Mon Dec 05 14:56:40 MST 2011
     [exec] [INFO] Final Memory: 71M/324M
     [exec] [INFO] 
------------------------------------------------------------------------
     [exec] Result: 1
     [echo] Finished compile
 
I'm not involved in the development of the mvn code, only the ant.  Can anybody 
offer some advise in tracking down why this guy is returning a 0 when he didn't 
even get to the compile task?
 
Thanks,
Eric

Reply via email to