my dev plugin version 1.480
------------------ 原始邮件 ------------------ 发件人: "我自己的邮箱";<[email protected]>; 发送时间: 2015年5月26日(星期二) 下午3:04 收件人: "jenkinsci-dev"<[email protected]>; 主题: java.util.zip.ZipException: archive is not a ZIP archive The error below occurs intermittently, with low frequency. but I have this zip file and can upzip it properly, I am not sure why this error pops up. pls reply ,thx ! java.util.zip.ZipException: archive is not a ZIP archive at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:481) at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:320) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:163) at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:124) at hudson.FilePath.unzip(FilePath.java:571) at hudson.FilePath.access$300(FilePath.java:191) at hudson.FilePath$3.invoke(FilePath.java:496) at hudson.FilePath$3.invoke(FilePath.java:492) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.unzip(FilePath.java:492) at com.wangyin.ci.performance.PerformanceReporterPublisher.copyReportsToMaster(PerformanceReporterPublisher.java:742) at com.wangyin.ci.performance.PerformanceReporterPublisher.perform(PerformanceReporterPublisher.java:334) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) My code:(PerformanceReporterPublisher.copyReportsToMaster) private void copyReportsToMaster(AbstractBuild<?, ?> build, PrintStream logger, FilePath[] listfilFilePaths, String parserDisplayName) throws IOException, InterruptedException { FilePath remoteZipDir = null; FilePath remoteZip = null; try { String zipString = "report-result.zip"; String zipDirString = "report-result"; remoteZipDir = new FilePath(build.getModuleRoot(), zipDirString); remoteZipDir.mkdirs(); logger.println("copy remote report to remote report-result dir...."); for (FilePath src : listfilFilePaths) { src.copyTo(new FilePath(remoteZipDir, src.getName())); } remoteZip = new FilePath(remoteZipDir.getParent(), zipString); logger.println("compress remote report-result dir ...."); remoteZipDir.zip(remoteZip); File localReport = getPerformanceReport(build, parserDisplayName, zipString); FilePath localReportFilePath = new FilePath(localReport); logger.println("copy report-result zip to locate...."); remoteZip.copyTo(localReportFilePath); FilePath resultDir = new FilePath(localReportFilePath.getParent(), zipDirString); localReportFilePath.unzip(resultDir); -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/tencent_040F57D267A4645A5A6BC356%40qq.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/tencent_0B2A01ED708E74EE5F286693%40qq.com. For more options, visit https://groups.google.com/d/optout.
