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

MavenArtifactArchiver fails if artifact is not a file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      I don't know what the correct fix is. The quickfix is to skip folders, but I
      guess the correct fix would be to find a way to archive folders as well.

      This can happen for example when the assembly plugin is used to produce an
      exploded zip (i.e. a folder):

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] /xxx/yyy/bbb/thing-1.0-SNAPSHOT.dir (Is a directory)
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.BuildFailureException: /xxx/yyy/bbb/thing-1.0-SNAPSHOT.dir (Is
      a directory)
      at
      org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:50)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
      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)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at hudson.maven.agent.Main.launch(Main.java:133)
      at hudson.maven.MavenBuilder.call(MavenBuilder.java:129)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:528)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:474)
      at hudson.remoting.UserRequest.perform(UserRequest.java:69)
      at hudson.remoting.UserRequest.perform(UserRequest.java:23)
      at hudson.remoting.Request$2.run(Request.java:206)
      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: java.io.FileNotFoundException: /xxx/yyy/bbb/thing-1.0-SNAPSHOT.dir
      (Is a directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at hudson.FilePath$21.invoke(FilePath.java:738)
      at hudson.FilePath$21.invoke(FilePath.java:736)
      at hudson.FilePath.act(FilePath.java:315)
      at hudson.FilePath.copyTo(FilePath.java:736)
      at hudson.FilePath.copyTo(FilePath.java:724)
      at
      hudson.maven.reporters.MavenArtifactArchiver.postBuild(MavenArtifactArchiver.java:123)
      at
      hudson.maven.MavenModuleSetBuild$Builder.postModule(MavenModuleSetBuild.java:561)
      at hudson.maven.MavenBuilder$Adapter.fireLeaveModule(MavenBuilder.java:261)
      at hudson.maven.MavenBuilder$Adapter.postBuild(MavenBuilder.java:225)
      at
      org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:45)
      ... 22 more

        Attachments

          Activity

          Hide
          bruyeron bruyeron added a comment -

          I forgot to mention that this happens with 1.236

          Show
          bruyeron bruyeron added a comment - I forgot to mention that this happens with 1.236
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=11241
          Log:
          [FIXED JENKINS-2122] if the assembly is creating a directory, ignore it.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=11241 Log: [FIXED JENKINS-2122] if the assembly is creating a directory, ignore it.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bruyeron bruyeron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: