mirror of https://github.com/apache/maven.git
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:
parent
6bba64b60d
commit
82d693b967
|
@ -23,6 +23,8 @@ import org.apache.maven.plugins.assemble.model.Assembly;
|
|||
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 class AssembleMojo
|
|||
|
||||
// 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 class AssembleMojo
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue