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

FileNotFoundException in hudson.maven.ExecutedMojo

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Maven 2.2.1, Hudson 1.336, Java 1.6, Linux/WinXP

      I have a multimodule maven project, where one sub-module is my ues-build-helper maven-plugin.

      When I build this project from command line, it is OK. But when I run the same build from Hudson, I obtain following exception in build-log and the build fails.

      java.io.FileNotFoundException: /home/devel/workspace/hudson/jobs/ues.platform-compile/workspace/maven/ues-build-helper/target/classes (Is a directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at hudson.maven.ExecutedMojo.<init>(ExecutedMojo.java:94)
      at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:745)
      at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:287)
      at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
      at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      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.classworlds.Launcher.launchEnhanced(Launcher.java:315)

      The solution is simple, the class hudson.maven.ExecutedMojo have to catch the FileNotFoundException on row 94 - I attach the modified source code for this class. After this patch the build procceds in the same way as from command line and the warning is logged and could be ignored.

          [JENKINS-5044] FileNotFoundException in hudson.maven.ExecutedMojo

          uni162 created issue -
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          kutzi made changes -
          Assignee New: kutzi [ kutzi ]
          kutzi made changes -
          Link New: This issue is related to JENKINS-14142 [ JENKINS-14142 ]
          Jenkins IRC Bot made changes -
          Component/s New: maven-plugin [ 16033 ]
          Component/s Original: maven2 [ 15487 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 135128 ] New: JNJira + In-Review [ 186926 ]

            kutzi kutzi
            uni162 uni162
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: