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

Unable to copy Maven site from workspace to site archive, IllegalArgumentException in FilePath class

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Red Hat Linux

      I have a "maven2/3 project" job. This job is configured to run nightly and only runs the site goal.

      The site generation works and completes successfully, but at random points in the build the following will appear in the logs:

      [HUDSON] Archiving site from /home/hudson/jobs/prod_trunk_site/workspace/dev/generator/target/site to /home/hudson/jobs/prod_trunk_site/site/generator
      FATAL: Unable to copy site from /home/hudson/jobs/prod_trunk_site/workspace/dev/generator/target/site to /home/hudson/jobs/prod_trunk_site/site/generator
      hudson.util.IOException2: java.lang.IllegalArgumentException: Negative time
      at hudson.FilePath.copyRecursiveTo(FilePath.java:1508)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:1433)
      at hudson.maven.reporters.MavenSiteArchiver.postExecute(MavenSiteArchiver.java:81)
      at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:950)
      at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:336)
      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:558)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      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:173)
      at hudson.maven.MavenBuilder.call(MavenBuilder.java:164)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:872)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:803)
      at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:636)
      Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative time
      at hudson.remoting.Channel$2.adapt(Channel.java:662)
      at hudson.remoting.Channel$2.adapt(Channel.java:657)
      at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      at hudson.FilePath.copyRecursiveTo(FilePath.java:1506)
      ... 35 more
      Caused by: java.lang.IllegalArgumentException: Negative time
      at java.io.File.setLastModified(File.java:1272)
      at hudson.FilePath.readFromTar(FilePath.java:1600)
      at hudson.FilePath.access$100(FilePath.java:162)
      at hudson.FilePath$32.invoke(FilePath.java:1497)
      at hudson.FilePath$32.invoke(FilePath.java:1494)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1931)
      ... 9 more

          [JENKINS-8908] Unable to copy Maven site from workspace to site archive, IllegalArgumentException in FilePath class

          xylo added a comment -

          I have the same problem. I'm using Hudson 1.395.1 on a Debian system with maven 2.2.1 and Java 1.6.0_22.

          xylo added a comment - I have the same problem. I'm using Hudson 1.395.1 on a Debian system with maven 2.2.1 and Java 1.6.0_22.

          Olivier Lamy added a comment -

          do you have same issue with last jenkins version ?

          Olivier Lamy added a comment - do you have same issue with last jenkins version ?

          xylo added a comment -

          Ah, sorry. I did not see there is a separate jenkins.war. I installed it, and you're right, Jenkins 1.404 does not have this problem anymore (at least in my case). So, thanks for the hint! And good bye Hudson, I'm migrating to Jenkins.

          xylo added a comment - Ah, sorry. I did not see there is a separate jenkins.war. I installed it, and you're right, Jenkins 1.404 does not have this problem anymore (at least in my case). So, thanks for the hint! And good bye Hudson, I'm migrating to Jenkins.

          kutzi added a comment -

          According to the previous 2 comments, this seems to be fixed

          kutzi added a comment - According to the previous 2 comments, this seems to be fixed

            Unassigned Unassigned
            jacobsb Bert Jacobs
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: