throws AssemblyFormattingException, ArchiveCreationException
{
// throw this check in just in case someone extends this class...
checkLogger();
final FileSetFormatter fileSetFormatter = new FileSetFormatter( configSource, logger );
if ( project == null )
{
project = configSource.getProject();
}
final File basedir = project.getBasedir();
String destDirectory = fileSet.getOutputDirectory();
if ( destDirectory == null )
{
destDirectory = fileSet.getDirectory();
}
destDirectory =
AssemblyFormatUtils.getOutputDirectory( destDirectory, configSource.getProject(), moduleProject, project,
configSource.getFinalName(), configSource );
if ( logger.isDebugEnabled() )
{
logger.debug( "FileSet[" + destDirectory + "]" + " dir perms: "
+ Integer.toString( archiver.getOverrideDirectoryMode(), 8 ) + " file perms: "
+ Integer.toString( archiver.getOverrideFileMode(), 8 )
+ ( fileSet.getLineEnding() == null ? "" : " lineEndings: " + fileSet.getLineEnding() ) );
}
logger.debug( "The archive base directory is '" + archiveBaseDir + "'" );
File fileSetDir = getFileSetDirectory( fileSet, basedir, archiveBaseDir );
if ( fileSetDir.exists() )
{
try
{
fileSetDir = fileSetFormatter.formatFileSetForAssembly( fileSetDir, fileSet );
}
catch ( final IOException e )
{
throw new ArchiveCreationException( "Error fixing file-set line endings for assembly: "
+ e.getMessage(), e );