AddArtifactTask task = new AddArtifactTask( artifact, getLogger() );
task.setFileNameMapping( binaries.getOutputFileNameMapping() );
task.setOutputDirectory( binaries.getOutputDirectory() );
task.setProject( project );
task.setModuleProject( project );
<BUG>task.setModuleArtifact( artifact );
task.setDirectoryMode( binaries.getDirectoryMode() );

task.setFileMode( binaries.getFileMode() );

task.setUnpack( binaries.isUnpack() );</BUG>
if ( binaries.isUnpack() && binaries.getUnpackOptions() != null )

AddArtifactTask task = new AddArtifactTask( artifact, getLogger() );
task.setFileNameMapping( binaries.getOutputFileNameMapping() );
task.setOutputDirectory( binaries.getOutputDirectory() );
task.setProject( project );
task.setModuleProject( project );
task.setModuleArtifact( artifact );
int dirMode = TypeConversionUtils.modeToInt( binaries.getDirectoryMode(), getLogger() );
if ( dirMode != -1 )
