final File basedir = directoryScanner.getBasedir();
final String[] includedFiles = directoryScanner.getIncludedFiles();
for (int index = 0; index < includedFiles.length; index++) {
AssemblerConfig config = new AssemblerConfig();
final File warSource = new File(basedir, includedFiles[index]);
config.setWarSource(warSource);
config.setDestination(getDestdir());
this.log("Assembling '" + warSource + "' to '" + getDestdir() + "'");
Assembler assembler = AssemblerFactory.getFactory().createAssembler(config);
assembler.assemble(config);
}
}
}
else {
AssemblerConfig config = new AssemblerConfig();
final File warSource = getWar();
if (warSource != null) {
config.setWarSource(warSource);
config.setDestination(getDestdir());
this.log("Assembling '" + warSource + "' to '" + getDestdir() + "'");
}
else {
config.setPortletDescriptor(getPortletxml());
config.setWebappDescriptor(getWebxml());
config.setDestination(getDestfile());
this.log("Assembling '" + getWebxml() + "' to '" + getDestfile() + "'");
}
Assembler assembler = AssemblerFactory.getFactory().createAssembler(config);