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

Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None

      When using Jenkins together with Maven and Tycho 0.13.0 version, in the console output of a build one can see detailed information about the exact cause of a compilation failure. Since upgrading to Tycho 0.15.0, when having a compilation failure, no additional info is shown in the console output. When running Maven and Tycho outside of Jenkins from command line, exact information about the compilation failure is shown and available.

      The current console output from Jenkins in case of a compilation failure looks like:
      message : Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.15.0:compile (default-compile) on project com.xxx: Compilation failure
      cause : Compilation failure
      Stack trace :
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.15.0:compile (default-compile) on project com.xxx: 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: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 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      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:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: copied.org.apache.maven.plugin.CompilationFailureException: Compilation failure
      at copied.org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:418)
      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

      And that is all. No one could find out of that what is the real issue behind. Running Maven, Tycho again from the console to see the exact cause is quite troublesome.

          [JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure

          Katalin Boros created issue -

          chris_mh3 added a comment -

          If you run the build with the -X option compiler output is shown as [DEBUG] message. This should clearly be [ERROR].

          chris_mh3 added a comment - If you run the build with the -X option compiler output is shown as [DEBUG] message. This should clearly be [ERROR] .

          Hi everyone. I need this bug/feature so much that I'm willing to pay 10.00 bucks for it.
          This offer is registered at FreedomSponsors (http://www.freedomsponsors.org/core/issue/193/maven-tycho-0150-build-no-additional-info-in-console-log-about-compilation-failure).
          Once you solve it (according to the acceptance criteria described there), just create a FreedomSponsors account and mark it as resolved (oh, you'll need a Paypal account too)
          I'll then check it out and will gladly pay up!

          If anyone else would like to throw in a few bucks to elevate the priority on this issue, you should check out FreedomSponsors!

          Andreas Bellmann added a comment - Hi everyone. I need this bug/feature so much that I'm willing to pay 10.00 bucks for it. This offer is registered at FreedomSponsors ( http://www.freedomsponsors.org/core/issue/193/maven-tycho-0150-build-no-additional-info-in-console-log-about-compilation-failure ). Once you solve it (according to the acceptance criteria described there), just create a FreedomSponsors account and mark it as resolved (oh, you'll need a Paypal account too) I'll then check it out and will gladly pay up! If anyone else would like to throw in a few bucks to elevate the priority on this issue, you should check out FreedomSponsors!

          Nikolas Falco added a comment -

          Me too.
          The same problem is restricted to job of type Maven2/3. With a job of kind general and a "Maven build" step there is no problem.

          Reason is the different handle of Maven execution and its exception in the MavenExecutionResult object. In a job of kind general is demand to Maven executable (Embedded Maven) instead in a job of kind Maven2/3 was reimplemented by jenkins to parse informations about sub-modules.

          I propose a solution with this pull request https://github.com/jenkinsci/jenkins/pull/851

          Nikolas Falco added a comment - Me too. The same problem is restricted to job of type Maven2/3. With a job of kind general and a "Maven build" step there is no problem. Reason is the different handle of Maven execution and its exception in the MavenExecutionResult object. In a job of kind general is demand to Maven executable (Embedded Maven) instead in a job of kind Maven2/3 was reimplemented by jenkins to parse informations about sub-modules. I propose a solution with this pull request https://github.com/jenkinsci/jenkins/pull/851

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java
          http://jenkins-ci.org/commit/jenkins/0b795de97e0aab2dda1af9b0ca7555cfd94a67b0
          Log:
          JENKINS-15025 Handle exceptions in the MavenExecutionResult in similar
          way as MavenCli do.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: maven-plugin/src/main/java/hudson/maven/Maven3Builder.java maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java http://jenkins-ci.org/commit/jenkins/0b795de97e0aab2dda1af9b0ca7555cfd94a67b0 Log: JENKINS-15025 Handle exceptions in the MavenExecutionResult in similar way as MavenCli do.

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          http://jenkins-ci.org/commit/jenkins/588e9cb7e122bda1e2aa2453fa99b8d4a94f418c
          Log:
          JENKINS-15025 Change PrintStreamLogger to System.out instead
          listener.getLogger (as MavenCli). In this manner output is highlighted.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: maven-plugin/src/main/java/hudson/maven/Maven3Builder.java http://jenkins-ci.org/commit/jenkins/588e9cb7e122bda1e2aa2453fa99b8d4a94f418c Log: JENKINS-15025 Change PrintStreamLogger to System.out instead listener.getLogger (as MavenCli). In this manner output is highlighted.

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java
          http://jenkins-ci.org/commit/jenkins/361071d611c21758bf8e98a876599831a98d59c2
          Log:
          Merge branch 'JENKINS-15025'

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: maven-plugin/src/main/java/hudson/maven/Maven3Builder.java maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java http://jenkins-ci.org/commit/jenkins/361071d611c21758bf8e98a876599831a98d59c2 Log: Merge branch ' JENKINS-15025 '

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java
          http://jenkins-ci.org/commit/jenkins/6af9127409255332c64ad1dd503f1ed24297f37a
          Log:
          [FIXED JENKINS-15025] no additional info in console log about failures

          Conflicts:
          maven-plugin/src/main/java/hudson/maven/Maven3Builder.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html maven-plugin/src/main/java/hudson/maven/Maven3Builder.java maven-plugin/src/main/java/hudson/maven/util/ExecutionEventLogger.java http://jenkins-ci.org/commit/jenkins/6af9127409255332c64ad1dd503f1ed24297f37a Log: [FIXED JENKINS-15025] no additional info in console log about failures Conflicts: maven-plugin/src/main/java/hudson/maven/Maven3Builder.java
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2758

          Result = SUCCESS

          dogfood added a comment - Integrated in jenkins_main_trunk #2758 Result = SUCCESS

            nfalco79 Nikolas Falco
            katalin_boros Katalin Boros
            Votes:
            13 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: