add zip, jar, and some notes

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-18 12:36:49 +00:00
parent 6bba64b60d
commit 82d693b967
1 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,8 @@
import org.apache.maven.plugins.assemble.model.FileSet;
import org.apache.maven.plugins.assemble.model.io.xpp3.AssemblyXpp3Reader;
import org.codehaus.plexus.archiver.Archiver;
import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.archiver.zip.ZipArchiver;
import org.codehaus.plexus.archiver.tar.TarArchiver;
import java.io.File;
@ -56,6 +58,8 @@ public void execute( PluginExecutionRequest request, PluginExecutionResponse res
// TODO: include dependencies marked for distribution under certain formats
// TODO: have a default set of descriptors that can be used instead of the file
// TODO: how, might we plugin this into an installer, such as NSIS?
// TODO: allow file mode specifications?
String fullName = finalName + "-" + assembly.getId();
@ -80,6 +84,15 @@ public void execute( PluginExecutionRequest request, PluginExecutionResponse res
tarArchiver.setCompression( tarCompressionMethod );
}
}
else if ( format.startsWith( "zip" ) )
{
archiver = new ZipArchiver();
}
else if ( format.startsWith( "jar" ) )
{
// TODO: use MavenArchiver for manifest?
archiver = new JarArchiver();
}
else
{
// TODO: better handling