提交 80f6c0d9 编写于 作者: K kohsuke

bug fix. Or should I say working around a bug in Maven?


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2019 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b9287adb
......@@ -52,7 +52,7 @@ public class MavenArtifactArchiver extends MavenReporter {
File file = a.getFile();
if(file==null)
return; // perhaps build failed and didn't leave an artifact
if(file.isDirectory())
if(!file.exists() || file.isDirectory())
return; // during a build maven sets a class folder instead of a jar file as artifact. ignore.
listener.getLogger().println("Archiving "+ file);
......
......@@ -92,7 +92,7 @@ public class MavenFingerprinter extends MavenReporter {
*/
private boolean record(MavenBuildProxy build, final boolean produced, Artifact a) throws IOException, InterruptedException {
File f = a.getFile();
if(f==null || f.isDirectory() || !files.add(f))
if(f==null || !f.exists() || f.isDirectory() || !files.add(f))
return false;
// new file
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册