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

Hudson fails to capture output that Maven sends to System.out/.err

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      I am running Hudson ver. 1.82-SNAPSHOT (private-02/14/2007 09:01-hudson) and I
      am getting this exception when I run compile on a Maven 2 project:

      [INFO ] ----------------------------------------------------------------------------
      [INFO ] Building util
      [INFO ] task-segment: [clean, compile]
      [INFO ] ----------------------------------------------------------------------------
      [INFO ] [clean:clean]
      [INFO ] Deleting directory /home/kldavis/.hudson/jobs/util/workspace/target
      [INFO ] Deleting directory /home/kldavis/.hudson/jobs/util/workspace/target/classes
      [INFO ] Deleting directory
      /home/kldavis/.hudson/jobs/util/workspace/target/test-classes
      [INFO ] [resources:resources]
      [INFO ] Using default encoding to copy filtered resources.
      [WARN ] While downloading servletapi:servletapi:2.4
      [WARN ] This artifact has been relocated to javax.servlet:servlet-api:2.4.
      [INFO ] [compiler:compile]
      ERROR: Compilation failure
      org.apache.maven.BuildFailureException: Compilation failure
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
      at hudson.maven.MavenEmbedder.execute(MavenEmbedder.java:441)
      at hudson.maven.MavenEmbedder.execute(MavenEmbedder.java:382)
      at hudson.maven.MavenBuild$Builder.invoke(MavenBuild.java:150)
      at hudson.maven.MavenBuild$Builder.invoke(MavenBuild.java:111)
      at hudson.FilePath.act(FilePath.java:191)
      at hudson.maven.MavenBuild$RunnerImpl.doRun(MavenBuild.java:243)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:110)
      at hudson.model.Run.run(Run.java:533)
      at hudson.maven.MavenBuild.run(MavenBuild.java:102)
      at hudson.model.Executor.run(Executor.java:61)
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
      at
      org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
      at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
      at
      org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
      at
      hudson.maven.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:119)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
      ... 15 more
      finished: FAILURE

      The project builds fine from the command line so it appears to be some issue
      with Hudson. I have also tried 1.81 with the same results.

          [JENKINS-308] Hudson fails to capture output that Maven sends to System.out/.err

          I believe you are trying the experimental native maven2 support, right?

          Maven sends javac output to System.out and System.err, and Hudson has a TODO to
          capture such output into the build output view. So I'm going to use this issue
          report for that purpose.

          In the mean time, you can look at the server log file to check what error javac
          produced, and more likely, you can use the freestyle project to build a maven
          project, which is much more stable.

          Kohsuke Kawaguchi added a comment - I believe you are trying the experimental native maven2 support, right? Maven sends javac output to System.out and System.err, and Hudson has a TODO to capture such output into the build output view. So I'm going to use this issue report for that purpose. In the mean time, you can look at the server log file to check what error javac produced, and more likely, you can use the freestyle project to build a maven project, which is much more stable.

          kldavis4 added a comment -

          Yes, I am using the experimental maven 2 support. So I checked the server log
          and didn't see any specific compile errors. The thing is, I happened to be
          running in a Tomcat debug instance inside of Eclipse, since I was just
          experimenting with it. When I started the tomcat instance outside of eclipse,
          the project built fine.

          kldavis4 added a comment - Yes, I am using the experimental maven 2 support. So I checked the server log and didn't see any specific compile errors. The thing is, I happened to be running in a Tomcat debug instance inside of Eclipse, since I was just experimenting with it. When I started the tomcat instance outside of eclipse, the project built fine.

          kldavis4 added a comment -

          Ok, it turns out that the thing that is causing things not to work is not that I
          was running tomcat in eclipse, but that I was running it jdk 1.6.0. When I
          switched to running 1.5.0_10, then it worked. It broke in eclipse only because I
          was was running 1.6.0 jvm for tomcat in Eclipse.

          kldavis4 added a comment - Ok, it turns out that the thing that is causing things not to work is not that I was running tomcat in eclipse, but that I was running it jdk 1.6.0. When I switched to running 1.5.0_10, then it worked. It broke in eclipse only because I was was running 1.6.0 jvm for tomcat in Eclipse.

          Fixed in 1.85.

          Kohsuke Kawaguchi added a comment - Fixed in 1.85.

            Unassigned Unassigned
            kldavis4 kldavis4
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: