title: Hitting org.apache.maven.lifecycle.LifecycleExecutionException with Maven 3 on Jenkins v1.461
body: <p>I am trying to switch from Maven 2 to Maven 3 (v3.0.4). The basic command being used is mvn clean verify on jenkins.</p>
  
  <p>When I run a build on jenkins I get the following stack trace on it's console:</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  
  &lt;snip /&gt;
  
  Waiting for Jenkins to finish collecting data
  mavenExecutionResult exceptions not empty
  message : Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:verify (default) on project myProject: There are test failures.
  
  Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
  cause : There are test failures.
  
  Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
  Stack trace : 
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:verify (default) on project myProject: There are test failures.
  
  Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
  at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
  at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
  at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
  at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
  at hudson.remoting.Request$2.run(Request.java:287)
  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:662)
  Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
  
  Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
  at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:121)
  at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:208)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
  ... 27 more
  Maven failed with error.
  Sending e-mails to: person@org.com
  channel stopped
  2012-07-11 21:01:31.564:INFO::Shutdown hook executing
  2012-07-11 21:01:31.564:INFO::Shutdown hook complete
  Archiving artifacts
  Sending e-mails to: person@org.com
  Finished: SUCCESS
  </code></pre>
  
  <p>I've tried quite hard searching on the net, trying various pom changes and running maven with -e, -X, -fae etc but nothing seems to allow me shake off this stack trace :( ..  been struggling w/ it for a few days now.</p>
  
  <p>Anybody able to help out with some suggestions and/or pin-pointing the issue w/ a solution would be greatly appreciated.</p>
  
  <p>Please note that the project is organized as:</p>
  
  <pre><code>Parent pom
  |
  ----------&gt; module 1
  ----------&gt; module 2
  ----------&gt; ...
  ----------&gt; module 6
  </code></pre>
  
  <p>where module 6 corresponds to myProject above and it has dependencies on some libraries (i.e. module1, module2 etc).</p>
  
  <p>The parent pom has:</p>
  
  <pre><code>&lt;reporting&gt;
    &lt;plugins&gt;
        { several plugins including maven-dependency-plugin, maven-project-info-reports-plugin, cobertura-maven-plugin, maven-surefire-report-plugin (v2.12) 
         and maven-surefire-report-plugin (v2.12) specifically w/
          &lt;reportSets&gt;
            &lt;reportSet&gt;
              &lt;id&gt;integration-tests&lt;/id&gt;
              &lt;reports&gt;
                &lt;report&gt;failsafe-report-only&lt;/report&gt;
              &lt;/reports&gt;
            &lt;/reportSet&gt;
          &lt;/reportSets&gt;
        }
    &lt;/plugins&gt;
  &lt;reporting&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;build&gt;
    &lt;pluginManagement&gt;
      &lt;plugins&gt;
          {several plugins including maven-surefire-plugin, maven-surefire-report-plugin (v2.12), maven-assembly-plugin, maven-release-plugin (v2.3.2)
      &lt;/plugins&gt;
    &lt;/pluginManagement&gt;
      &lt;plugins&gt;
          {several plugins including maven-site-plugin (v3.1), maven-compiler-plugin (v2.5.1), maven-release-plugin (v2.3.2)
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Please also note that I am seeing the problem exactly when there are test failures i.e. I would like to get a clean (no stack traces et all) console output when there is a test failure. In fact during my above mentioned troubleshooting I actually setup an (intentionally) failing test. Also when I look at '/home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports' the failsafe reports/test failure details output looks good i.e. I see my expected test failure screen capture (custom logic in our framework) AND various summary/reports like emailable-report.html with correct contents.</p>
  
  <p>Thank you !</p>