简体   繁体   中英

jenkins throws exception when archiving artifacts

all,
The jenkins threw an exception when archiving artifacts after finished compiling.
Here goes the error message:

     Archiving artifacts
12:35:16  ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
12:35:16  java.lang.IllegalArgumentException: Negative time
12:35:16    at java.io.File.setLastModified(File.java:1344)
12:35:16    at hudson.FilePath.readFromTar(FilePath.java:2080)
12:35:16    at hudson.FilePath.copyRecursiveTo(FilePath.java:2000)
12:35:16    at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:57)
12:35:16    at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:140)
12:35:16    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
12:35:16    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
12:35:16    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
12:35:16    at hu2:35:16    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
12:35:16    at hudson.model.Run.execute(Run.java:1703)
12:35:16    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
12:35:16    at hudson.model.ResourceController.execute(ResourceController.java:88)
12:35:16    at hudson.model.Executor.run(Executor.java:231)  dson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1030)
1

Thanks
Steven

This can be caused by having an artifact larger than 8GB.

See Jenkins bug report JENKINS-10629 .

Do your artifacts generate weird characters like spaces +-._ etc? Try removing them and things should work normally.

如果要归档的任何文件的名称太长,比如它有这么多字符,那么也会出现这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM