}
private File getWebResourceDir() throws IOException {
File webResourceDir = new File(tempDir, "webapp");
LOG.debug("building webapp in {}", webResourceDir);
ZipExploder exploder = new ZipExploder();
webResourceDir.mkdir();
if (option.getOverlays().isEmpty()) {
option.overlay("src/main/webapp");
}
for (String overlay : option.getOverlays()) {
File file = toFile(overlay);
if (file.exists()) {
if (file.isDirectory()) {
copyDirectory(file, webResourceDir);
}
else {
exploder.processFile(file.getAbsolutePath(), webResourceDir.getAbsolutePath());
}
}
}
File metaInfDir = new File(webResourceDir, "META-INF");