throw new ArchiverException( directory.getAbsolutePath() + " isn't a directory." );
}
// The PlexusIoFileResourceCollection contains platform-specific File.separatorChar which
// is an interesting cause of grief, see PLXCOMP-192
final PlexusIoFileResourceCollection collection = new PlexusIoFileResourceCollection( getLogger() );
collection.setIncludes( fileSet.getIncludes() );
collection.setExcludes( fileSet.getExcludes() );
collection.setBaseDir( directory );
collection.setFileSelectors( fileSet.getFileSelectors() );
collection.setIncludingEmptyDirectories( fileSet.isIncludingEmptyDirectories() );
collection.setPrefix( fileSet.getPrefix() );
collection.setCaseSensitive( fileSet.isCaseSensitive() );
collection.setUsingDefaultExcludes( fileSet.isUsingDefaultExcludes() );
if ( getOverrideDirectoryMode() > -1 || getOverrideFileMode() > -1 )
{
collection.setOverrideAttributes( -1, null, -1, null, getOverrideFileMode(), getOverrideDirectoryMode() );
}
if ( getDefaultDirectoryMode() > -1 || getDefaultFileMode() > -1 )
{
collection.setDefaultAttributes( -1, null, -1, null, getDefaultFileMode(), getDefaultDirectoryMode() );
}
addResources( collection );
}