Class ProductArchiverMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.plugins.p2.director.AbstractProductMojo
-
- org.eclipse.tycho.plugins.p2.director.ProductArchiverMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="archive-products", defaultPhase=PACKAGE) public final class ProductArchiverMojo extends AbstractProductMojoCreates archives with the product installations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classProductArchiverMojo.ProductArchiver
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDEFAULT_ARCHIVE_FORMATprivate java.util.Map<java.lang.String,java.lang.String>formatsMaps os to format.private org.apache.maven.project.MavenProjectHelperhelperprivate java.util.Map<java.lang.String,ProductArchiverMojo.ProductArchiver>productArchiversMaps archive type to ProductArchiverprivate static java.lang.StringTAR_GZ_ARCHIVE_FORMATprivate org.codehaus.plexus.archiver.tar.TarArchivertarArchiverprivate org.codehaus.plexus.archiver.ArchiverzipArchiver
-
Constructor Summary
Constructors Constructor Description ProductArchiverMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcreateCommonsCompressTarGz(java.io.File productArchive, java.io.File sourceDir)voidexecute()(package private) static java.lang.StringgetArchiveFileName(Product product)private java.lang.StringgetArchiveFormat(TargetEnvironment env)(package private) static java.lang.StringgetArtifactClassifier(Product product, TargetEnvironment environment)-
Methods inherited from class org.eclipse.tycho.plugins.p2.director.AbstractProductMojo
getBuildDirectory, getEnvironments, getForkedProcessTimeoutInSeconds, getOsWsArch, getProductConfig, getProductMaterializeDirectory, getProductsBuildDirectory, getProject, getSession
-
-
-
-
Field Detail
-
DEFAULT_ARCHIVE_FORMAT
private static final java.lang.String DEFAULT_ARCHIVE_FORMAT
- See Also:
- Constant Field Values
-
TAR_GZ_ARCHIVE_FORMAT
private static final java.lang.String TAR_GZ_ARCHIVE_FORMAT
- See Also:
- Constant Field Values
-
productArchivers
private final java.util.Map<java.lang.String,ProductArchiverMojo.ProductArchiver> productArchivers
Maps archive type to ProductArchiver
-
formats
@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- zip
- tar.gz
-
zipArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="zip") private org.codehaus.plexus.archiver.Archiver zipArchiver
-
tarArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="tar") private org.codehaus.plexus.archiver.tar.TarArchiver tarArchiver
-
helper
@Component private org.apache.maven.project.MavenProjectHelper helper
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
createCommonsCompressTarGz
private void createCommonsCompressTarGz(java.io.File productArchive, java.io.File sourceDir) throws java.io.IOException- Throws:
java.io.IOException
-
getArchiveFormat
private java.lang.String getArchiveFormat(TargetEnvironment env)
-
getArchiveFileName
static java.lang.String getArchiveFileName(Product product)
-
getArtifactClassifier
static java.lang.String getArtifactClassifier(Product product, TargetEnvironment environment)
-
-