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

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          http://jenkins-ci.org/commit/maven-plugin/53987d1c00d14dee7ab726b2eb7500f4f8b27599
          Log:
          JENKINS-19352: partial revert of JENKINS-15025, so that Maven exceptions are
          visible in the console log, again

          Compare: https://github.com/jenkinsci/maven-plugin/compare/c87013d3f82b...53987d1c00d1

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/maven/Maven3Builder.java http://jenkins-ci.org/commit/maven-plugin/53987d1c00d14dee7ab726b2eb7500f4f8b27599 Log: JENKINS-19352 : partial revert of JENKINS-15025 , so that Maven exceptions are visible in the console log, again Compare: https://github.com/jenkinsci/maven-plugin/compare/c87013d3f82b...53987d1c00d1

          Nikolas Falco added a comment -

          Found the cause of problem in the merge.
          In the branch "Maven 3.1.0 support branch" was replace local instance of hudson.maven.util.ExecutionEventLogger with org.apache.maven.cli.event.ExecutionEventLogger in the MavenExecutionListener class.

          This cut off also a minor changes in the local ExecutionEventLogger where an Olivier Lamy note mention "copied from package org.apache.maven.cli with just one minor adaption for Maven3Mojo".

          I plan to:

          • move error processing (postponed by Maven3Launcher.main call) to a common place into the executor Maven3Builder class, this will work fine in case of Maven 3 (that use MavenExecutionListener) and with Maven 3.1 (that use JenkinsEventSpy class);
          • hudson.maven.util.ExecutionEventLogger extends (instead copy paste) original class, and override only method mojoStarted (more flexible to future changes);
          • restore use of hudson.maven.util.ExecutionEventLogger in the MavenExecutionListener class.

          Nikolas Falco added a comment - Found the cause of problem in the merge. In the branch "Maven 3.1.0 support branch" was replace local instance of hudson.maven.util.ExecutionEventLogger with org.apache.maven.cli.event.ExecutionEventLogger in the MavenExecutionListener class. This cut off also a minor changes in the local ExecutionEventLogger where an Olivier Lamy note mention "copied from package org.apache.maven.cli with just one minor adaption for Maven3Mojo". I plan to: move error processing (postponed by Maven3Launcher.main call) to a common place into the executor Maven3Builder class, this will work fine in case of Maven 3 (that use MavenExecutionListener) and with Maven 3.1 (that use JenkinsEventSpy class); hudson.maven.util.ExecutionEventLogger extends (instead copy paste) original class, and override only method mojoStarted (more flexible to future changes); restore use of hudson.maven.util.ExecutionEventLogger in the MavenExecutionListener class.

          Nikolas Falco added a comment -

          Maven job on a test project with compile errors. Running with Maven 3.1

          Nikolas Falco added a comment - Maven job on a test project with compile errors. Running with Maven 3.1

          Nikolas Falco added a comment -

          Maven job on a test project with compile errors. Running with Maven 3.0. Summary is there but output is different due to slf4j settings.

          Nikolas Falco added a comment - Maven job on a test project with compile errors. Running with Maven 3.0. Summary is there but output is different due to slf4j settings.

          Nikolas Falco added a comment -

          Nikolas Falco added a comment - I post a pull request at https://github.com/jenkinsci/maven-plugin/pull/2

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/util/ExecutionEventLogger.java
          http://jenkins-ci.org/commit/maven-plugin/8c008c588914c16f626b236d0bebe2073b9dacc5
          Log:
          [FIXED JENKINS-15025]: Maven-Tycho 0.15.0 build - no additional info in
          console log about compilation failure.

          Restore use of hudson.maven.util.ExecutionEventLogger in the
          MavenExecutionListener instance.
          Now it extends the original org.apache.maven.cli.ExecutionEventLogger
          and override only the enhanced mojoStarted method.
          Move the logic of errors processing to main executor class
          Maven3Builder.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/util/ExecutionEventLogger.java http://jenkins-ci.org/commit/maven-plugin/8c008c588914c16f626b236d0bebe2073b9dacc5 Log: [FIXED JENKINS-15025] : Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure. Restore use of hudson.maven.util.ExecutionEventLogger in the MavenExecutionListener instance. Now it extends the original org.apache.maven.cli.ExecutionEventLogger and override only the enhanced mojoStarted method. Move the logic of errors processing to main executor class Maven3Builder.

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/Maven3ResultProcessor.java
          http://jenkins-ci.org/commit/maven-plugin/0cb01758f0379ec112e1e374871e598bfb41a7a5
          Log:
          [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in
          console log about compilation failure

          Move Maven3ResultProcessor to external class
          CQI - change failNever variable name
          CQI - change return type of process method to boolean instead of int
          (default for CLI)
          Bug fix on compare project

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/Maven3ResultProcessor.java http://jenkins-ci.org/commit/maven-plugin/0cb01758f0379ec112e1e374871e598bfb41a7a5 Log: [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure Move Maven3ResultProcessor to external class CQI - change failNever variable name CQI - change return type of process method to boolean instead of int (default for CLI) Bug fix on compare project

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/Maven3FailureLogger.java
          src/main/java/hudson/maven/Maven3ResultProcessor.java
          http://jenkins-ci.org/commit/maven-plugin/721e379ca4e0c7373d348c789b70eeb21a881cb6
          Log:
          [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure

          Rename Maven3ResultProcessor to Maven3FailureLogger and move to package visibility.
          Method processFailure (now logFailures) only logs failure details, restore
          execution result check in Maven3Builder.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/Maven3FailureLogger.java src/main/java/hudson/maven/Maven3ResultProcessor.java http://jenkins-ci.org/commit/maven-plugin/721e379ca4e0c7373d348c789b70eeb21a881cb6 Log: [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure Rename Maven3ResultProcessor to Maven3FailureLogger and move to package visibility. Method processFailure (now logFailures) only logs failure details, restore execution result check in Maven3Builder.

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/Maven3FailureLogger.java
          http://jenkins-ci.org/commit/maven-plugin/3f448208ec48828779d0c1f512dcc4e589d8c552
          Log:
          [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in
          console log about compilation failure

          Rename method processCLIArguments to setOptions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/Maven3FailureLogger.java http://jenkins-ci.org/commit/maven-plugin/3f448208ec48828779d0c1f512dcc4e589d8c552 Log: [FIXED JENKINS-15025] Maven-Tycho 0.15.0 build - no additional info in console log about compilation failure Rename method processCLIArguments to setOptions

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/maven/Maven3Builder.java
          src/main/java/hudson/maven/Maven3FailureLogger.java
          src/main/java/hudson/maven/util/ExecutionEventLogger.java
          http://jenkins-ci.org/commit/maven-plugin/b38d81d66de5d86ad70187740efd813ed2dd357b
          Log:
          Merge branch 'JENKINS-15025' of https://github.com/nfalco79/maven-plugin

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/maven/Maven3Builder.java src/main/java/hudson/maven/Maven3FailureLogger.java src/main/java/hudson/maven/util/ExecutionEventLogger.java http://jenkins-ci.org/commit/maven-plugin/b38d81d66de5d86ad70187740efd813ed2dd357b Log: Merge branch ' JENKINS-15025 ' of https://github.com/nfalco79/maven-plugin

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

              Created:
              Updated:
              Resolved: