resultFiles.add(f);
}
TreeLogger branch = logger.branch(TreeLogger.INFO, "Linking module "
+ module.getName());
StandardLinkerContext linkerContext = new StandardLinkerContext(branch,
module, precompileOptions);
try {
OutputFileSet outFileSet = chooseOutputFileSet(options.getWarDir(),
module.getName() + "/");
OutputFileSet extraFileSet = chooseOutputFileSet(options.getExtraDir(),
module.getName() + "/");
// allow -deploy and -extra to point to the same directory/jar
OutputFileSet deployFileSet;
if (options.getDeployDir().equals(options.getExtraDir())) {
deployFileSet = extraFileSet;
} else {
deployFileSet = chooseOutputFileSet(options.getDeployDir(),
module.getName() + "/");
}
ArtifactSet artifacts = scanCompilePermResults(logger, resultFiles);
artifacts.addAll(linkerContext.getArtifactsForPublicResources(logger,
module));
artifacts = linkerContext.invokeFinalLink(logger, artifacts);
doProduceOutput(logger, artifacts, linkerContext, outFileSet,
deployFileSet, extraFileSet);
} catch (IOException e) {
logger.log(TreeLogger.ERROR, "Exception during final linking", e);
throw new UnableToCompleteException();