@Mojo(name="archive-products", defaultPhase=PACKAGE) public final class ProductArchiverMojo extends AbstractProductMojo
Creates archives with the product installations.
Modifier and Type | Class and Description |
---|---|
private class |
ProductArchiverMojo.ProductArchiver |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DEFAULT_ARCHIVE_FORMAT |
private java.util.Map<java.lang.String,java.lang.String> |
formats
Maps os to format.
|
private org.apache.maven.project.MavenProjectHelper |
helper |
private java.util.Map<java.lang.String,ProductArchiverMojo.ProductArchiver> |
productArchivers
Maps archive type to ProductArchiver
|
private static java.lang.String |
TAR_GZ_ARCHIVE_FORMAT |
private org.codehaus.plexus.archiver.tar.TarArchiver |
tarArchiver |
private org.codehaus.plexus.archiver.Archiver |
zipArchiver |
Constructor and Description |
---|
ProductArchiverMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
createCommonsCompressTarGz(java.io.File productArchive,
java.io.File sourceDir) |
void |
execute() |
(package private) static java.lang.String |
getArchiveFileName(Product product) |
private java.lang.String |
getArchiveFormat(TargetEnvironment env) |
(package private) static java.lang.String |
getArtifactClassifier(Product product,
TargetEnvironment environment) |
getBuildDirectory, getEnvironments, getForkedProcessTimeoutInSeconds, getOsWsArch, getProductConfig, getProductMaterializeDirectory, getProductsBuildDirectory, getProject, getSession
private static final java.lang.String DEFAULT_ARCHIVE_FORMAT
private static final java.lang.String TAR_GZ_ARCHIVE_FORMAT
private final java.util.Map<java.lang.String,ProductArchiverMojo.ProductArchiver> productArchivers
@Parameter private java.util.Map<java.lang.String,java.lang.String> formats
Maps os to format. By default a zip file will be created. For example, the following configuration will create tar.gz product archives for Linux
<formats> <linux>tar.gz</linux> </formats>Supported formats
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="zip") private org.codehaus.plexus.archiver.Archiver zipArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="tar") private org.codehaus.plexus.archiver.tar.TarArchiver tarArchiver
@Component private org.apache.maven.project.MavenProjectHelper helper
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private void createCommonsCompressTarGz(java.io.File productArchive, java.io.File sourceDir) throws java.io.IOException
java.io.IOException
private java.lang.String getArchiveFormat(TargetEnvironment env)
static java.lang.String getArchiveFileName(Product product)
static java.lang.String getArtifactClassifier(Product product, TargetEnvironment environment)