I have a Maven job defined in Jenkins using the Maven Project Plugin. When this build fails with an error (i.e. missing the web.xml when building a war file or missing a filter properties file), the Console Output in Jenkins for the job does not show the actual ERROR log and this is making debugging failed builds nearly impossible.
Several other similar questions on here suggest using the -e and -X options, but that is not solving the problem. These options are both enabled successfully and debug output is shown, but not the ERROR logs indicating the actual failures.
Is there some additional Jenkins or Maven logging configuration that I need to enable or change to make these ERRORs show up in the Console Output of Jenkins?
These are the versions I am using:
Maven 3.05
Jenkins 1.5.27
Maven Project Plugin 1.5.27
The mvn command:
mvn clean deploy
The output I get when running from the command line - this is what I want to see:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] base .................................. FAILURE [9.952s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.636s
[INFO] Finished at: Wed Aug 28 11:50:46 CDT 2013
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project base: Error loading property file '/Applications/eclipse/workspace/base/src/filters/dev/developerOverride/jenna.pederson.properties' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :base
The output I get when running from Jenkins - this is not helpful:
INFO: ------------------------------------------------------------------------
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logReactorSummary
INFO: Reactor Summary:
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logReactorSummary
INFO:
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logReactorSummary
INFO: base .................................. FAILURE [0.533s]
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logReactorSummary
INFO: ------------------------------------------------------------------------
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logResult
INFO: BUILD FAILURE
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: ------------------------------------------------------------------------
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Total time: 3.401s
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Finished at: Wed Aug 28 11:02:36 CDT 2013
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger logStats
INFO: Final Memory: 8M/258M
Aug 28, 2013 11:02:36 AM org.apache.maven.cli.event.ExecutionEventLogger sessionEnded
INFO: ------------------------------------------------------------------------
[JENKINS] Archiving /home/jenkins/jobs/0.1.0-b1 - Maven/workspace/base/pom.xml to /home/jenkins/jobs/0.1.0-b1 - Maven/modules/com.base$base/builds/2013-08-28_11-02-30/archive/com.base/base/0.1.0-b1-SNAPSHOT/base-0.1.0-b1-SNAPSHOT.pom
channel stopped
Finished: FAILURE
In Jenkins, in the pipeline where failure occurred, in the pane, select the latest build, and click Console Output. On the Console Output page, check the logs to find the reason for the failure.
On Windows, Jenkins log files are stored as jenkins. out (console output logs) and jenkins. err (error logs) in the Jenkins home folder. Note: Jenkins logs may be stored in the Jenkins installation folder in Program Files on some Windows systems.
This appears to be a new bug in the core/maven-plugin as reported here: https://groups.google.com/forum/#!msg/jenkinsci-users/kKruFR_k3Ho/ElQAdXs5sG0J
I have verified it works correctly in Jenkins v1.519 and does not work in 1.527, 1.529. As suggested, will consider downgrading to an LTS version or waiting til 1.530.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With