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

FileNotFoundException in hudson.maven.ExecutedMojo

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • maven-plugin
    • None
    • Maven 2.2.1, Hudson 1.336, Java 1.6, Linux/WinXP

    Description

      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.

      Attachments

        Issue Links

          Activity

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: