FileUtils.copyFile( getJarArchiver().getDestFile(), targetClassesFile );
projectHelper.attachArtifact( getProject(), "jar", getClassesClassifier(), targetClassesFile );
}
else
{
ClassesPackager packager = new ClassesPackager();
final File classesDirectory = packager.getClassesDirectory( getWebappDirectory() );
if ( classesDirectory.exists() )
{
getLog().info( "Packaging classes" );
packager.packageClasses( classesDirectory, getTargetClassesFile(), getJarArchiver(), getSession(),
getProject(), getArchive() );
projectHelper.attachArtifact( getProject(), "jar", getClassesClassifier(), getTargetClassesFile() );
}
}
}