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, threadSafe=true) public final class ProductArchiverMojo extends AbstractProductMojo
Creates archives with the product installations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ProductArchiverMojo.ProductArchiver
-
Field Summary
Fields Modifier and Type Field 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 static java.lang.Object
LOCK
private java.util.Map<java.lang.String,ProductArchiverMojo.ProductArchiver>
productArchivers
Maps archive type to ProductArchiverprivate static java.lang.String
TAR_GZ_ARCHIVE_FORMAT
private org.codehaus.plexus.archiver.tar.TarArchiver
tarArchiver
private org.codehaus.plexus.archiver.Archiver
zipArchiver
-
Constructor Summary
Constructors Constructor Description ProductArchiverMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class org.eclipse.tycho.plugins.p2.director.AbstractProductMojo
getBuildDirectory, getEnvironments, getForkedProcessTimeoutInSeconds, getOsWsArch, getProductConfig, getProductMaterializeDirectory, getProductsBuildDirectory, getProject, getSession
-
-
-
-
Field Detail
-
LOCK
private static final java.lang.Object LOCK
-
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.MojoExecutionException
org.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)
-
-