How can I tell jenkins I do want the full error trace from a maven job?
Solution 1
mvn --help lists down options you can use with mvn command.
-e,--errors Produce execution error messages
-X,--debug Produce execution debug output
-q,--quiet Quiet output - only show errors
Should you not be using maven with -e option to track down errors in jenkins job configuration.
Solution 2
Just add -X option to the Maven command line in the Jenkins configuration. But be aware that the output can be very long.
Solution 3
for this there are two possible ways to find out where your problem is:
- add -Xdebug to your MAVEN_OPTS
set MAVEN_OPTS=-Xmx1024m -Xms1024m -Xdebug call mvn clean install
- Or look for the failure via remote debugging. For this add the "maven-compiler-plugin" to one of your eclipse projects and start the maven build on your broken project with
set MAVEN_OPTS=-Xmx1024m -Xms1024m -Xdebug -XX:PermSize=256m -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y call mvn install
Than start a remote debug session in eclipse and add a "error" brake point to "CompilationFailureException" this will figure out your problem immediately.
Wish you much luck for it
Solution 4
I could be way off base here, but it looks like
Injector injector = new com.visualligence.g.VMLStandaloneSetupGenerated().createInjectorAndDoEMFRegistration();
is cuasing an error, either because you have a null reference, or because the library that the class comes from wasn't marked properly as a dependancy.
robermorales
I am a happy engineer, constantly looking for new challenges.
Updated on July 17, 2020Comments
-
robermorales almost 4 years
Running a maven job in jenkins fails with that console output:
Finished: FAILURE
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:52.431s [INFO] Finished at: Tue Mar 27 17:17:54 CEST 2012 [INFO] Final Memory: 69M/145M [INFO] ------------------------------------------------------------------------ mavenExecutionResult exceptions not empty message : Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.14.1:compile (default-compile) on project com.visualligence.g: Compilation failure cause : Compilation failure Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.14.1:compile (default-compile) on project com.visualligence.g: 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 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:319) 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:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) 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: copied.org.apache.maven.plugin.CompilationFailureException: Compilation failure at copied.org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:409) at org.eclipse.tycho.compiler.AbstractOsgiCompilerMojo.execute(AbstractOsgiCompilerMojo.java:179) 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
And every log file found on workspace ends the same way.
But running
../../../tools/maven/bin/mvn install
from a prompt, inside
/var/lib/jenkins/jobs/visualligence/workspace
outputs a full error trace with the compilation errors that can help to solve the problem:
(...) [INFO] Compiling 10 source files to /var/lib/jenkins/jobs/visualligence/workspace/target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:47.960s [INFO] Finished at: Tue Mar 27 17:39:27 CEST 2012 [INFO] Final Memory: 65M/169M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.14.1:compile (default-compile) on project com.visualligence.g: Compilation failure: Compilation failure: [ERROR] /var/lib/jenkins/jobs/visualligence/workspace/src/com/visualligence/g/generator/Main.java:[30,0] [ERROR] Injector injector = new com.visualligence.g.VMLStandaloneSetupGenerated().createInjectorAndDoEMFRegistration(); [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (...)
How can I tell jenkins I do want that error trace?
-
khmarbaise almost 12 yearsCan you simply add the full output cause nobody can follow the problem without accurate information.
-
robermorales over 11 yearsSure, SSR. I did not make it work with any of the suggestions. Thanks for the tip, btw.
-
robinst about 11 yearsSeems to be a problem with Tycho on Jenkins, see the following bug report: issues.jenkins-ci.org/browse/JENKINS-15025
-
-
robermorales about 12 yearsI added -X and get a lot of new DEBUG output. But the error is the same, an indirect one.
-
SpellingD about 12 yearsEverything after BUILD FAILURE in the log is just a "summary" of failures, to figure out the exact problem, you need to look somewhere in the log ABOVE what you've posted, starting with "Building com.visualligence.g".
-
robermorales almost 12 yearsEverything above that seems very regular and does not contain any error. Sure.
-
Rui Marques over 10 yearsThanks, adding -X helped me.
-
trebor over 2 yearsThe Jenkins GUI has changed and now Goals and Properties are configured separately and the original answer doesn't appear to apply.