Navigation Menu

Skip to content

Commit

Permalink
[JENKINS-51302] - Properly cleanup Metadata so that PCT does not miss…
Browse files Browse the repository at this point in the history
… metadata for running integration tests
  • Loading branch information
oleg-nenashev committed May 14, 2018
1 parent 615fb7d commit 9a011d9
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -84,13 +84,19 @@ private void explode(@Nonnull Set<String> excludes) throws IOException {
}

public JenkinsWarPatcher removeMetaInf() throws IOException {
File p = new File(dstDir, "META-INF");
if (p.exists()) {
FileUtils.deleteDirectory(p);
}
deleteMetaINFFiles("MANIFEST.MF", "JENKINS.SF", "JENKINS.RSA");
return this;
}

private void deleteMetaINFFiles(String ... filenames) throws IOException {
for (String filename : filenames) {
File p = new File(dstDir, "META-INF/" + filename);
if (p.exists() && !p.delete()) {
throw new IOException("Failed to delete the metadata file " + p);
}
}
}

private File getLibsDir() {
return new File(dstDir, "WEB-INF/lib");
}
Expand Down

0 comments on commit 9a011d9

Please sign in to comment.