}
}
final UnpackOptions opts = dependencySet.getUnpackOptions();
final FileSet fs = new FileSet();
fs.setDirectory( dir.getAbsolutePath() );
fs.setDirectoryMode( dependencySet.getDirectoryMode() );
fs.setExcludes( opts.getExcludes() );
fs.setFileMode( dependencySet.getFileMode() );
fs.setFiltered( opts.isFiltered() );
fs.setIncludes( opts.getIncludes() );
String outDir = dependencySet.getOutputDirectory();
if ( outDir == null )
{
outDir = defaultOutputDirectory;
}
String filenameMapping = dependencySet.getOutputFileNameMapping();
if ( filenameMapping == null )
{
filenameMapping = defaultOutputFileNameMapping;
}
filenameMapping =
AssemblyFormatUtils.evaluateFileNameMapping( filenameMapping, depArtifact, configSource.getProject(),
moduleProject, moduleArtifact, depProject, configSource );
final String outputLocation = new File( outDir, filenameMapping ).getPath();
fs.setOutputDirectory( outputLocation );
fs.setLineEnding( opts.getLineEnding() );
fs.setUseDefaultExcludes( opts.isUseDefaultExcludes() );
final AddFileSetsTask task = new AddFileSetsTask( fs );
task.setProject( depProject );
task.setModuleProject( moduleProject );
task.setLogger( logger );