Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12858

With Maven3 when build fails does not show exceptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • maven-plugin

      Console does not display the full stack trace when building using maven3 if the build fails.

      MAVEN 3 BUILD CONSOLE ON JENKINS
      [INFO] ------------------------------------------------------------------------
      [INFO] Building ConnectionPool-sportello-jar 1.0.0
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ConnectionPool-sportello-jar ---
      [INFO] 
      [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ ConnectionPool-sportello-jar ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] Copying 1 resource
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ ConnectionPool-sportello-jar ---
      [INFO] Compiling 5 source files to /var/lib/jenkins/workspace/sisi.dsvai.sportello.ConnectionPool-sportello/ConnectionPool-sportello-jar/target/classes
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 9.376s
      [INFO] Finished at: Wed Feb 22 19:05:08 CET 2012
      [INFO] Final Memory: 7M/81M
      [INFO] ------------------------------------------------------------------------
      mavenExecutionResult exceptions not empty
      message : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ConnectionPool-sportello-jar: Compilation failure
      cause : Compilation failure
      Stack trace : 
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ConnectionPool-sportello-jar: Compilation failure
      	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 java.lang.Thread.run(Thread.java:662)
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
      	at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
      	at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 27 more
      channel stopped
      Finished: FAILURE
      *** END MAVEN 3 BUILD CONSOLE ON JENKINS ***
      

      Real console output

      MAVEN 3 REAL OUTPUT
      [INFO] Finished at: Wed Feb 22 19:21:51 CET 2012
      [INFO] Final Memory: 5M/88M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ConnectionPool-sportello-jar: Compilation failure: Compilation failure:
      [ERROR] /var/lib/jenkins/workspace/sisi.dsvai.sportello.ConnectionPool-sportello/ConnectionPool-sportello-jar/src/main/java/it/bankit/sportello/connectionPool/SockIOPool.java:[62,17] unmappable character for encoding UTF8
      [ERROR] 
      [ERROR] /var/lib/jenkins/workspace/sisi.dsvai.sportello.ConnectionPool-sportello/ConnectionPool-sportello-jar/src/main/java/it/bankit/sportello/connectionPool/SockIOPool.java:[68,56] unmappable character for encoding UTF8
      [ERROR] 
      [ERROR] /var/lib/jenkins/workspace/sisi.dsvai.sportello.ConnectionPool-sportello/ConnectionPool-sportello-jar/src/main/java/it/bankit/sportello/connectionPool/SockIOPool.java:[125,13] unmappable character for encoding UTF8
      [ERROR] 
      *** END MAVEN 2 SAMPLE OUTPUT ***
      

      Every line tagged with '[ERROR]' is not logged.

      Everything works using Maven2 that does not tag each line with '[ERROR]', probably a different output classification.

            Unassigned Unassigned
            mtizzoni Marco Tizzoni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: