abstract class AbstractProductMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private int |
forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds.
|
private java.util.List<Product> |
products
Selection of products to be installed and configuration per product.
|
private org.apache.maven.project.MavenProject |
project |
private org.apache.maven.execution.MavenSession |
session |
Constructor and Description |
---|
AbstractProductMojo() |
Modifier and Type | Method and Description |
---|---|
(package private) BuildOutputDirectory |
getBuildDirectory() |
(package private) java.util.List<TargetEnvironment> |
getEnvironments() |
(package private) int |
getForkedProcessTimeoutInSeconds() |
(package private) static java.lang.String |
getOsWsArch(TargetEnvironment env,
char separator) |
(package private) ProductConfig |
getProductConfig() |
(package private) java.io.File |
getProductMaterializeDirectory(Product product,
TargetEnvironment env) |
(package private) java.io.File |
getProductsBuildDirectory() |
(package private) org.apache.maven.project.MavenProject |
getProject() |
(package private) org.apache.maven.execution.MavenSession |
getSession() |
getLog, getPluginContext, setLog, setPluginContext
@Parameter(property="project", readonly=true) private org.apache.maven.project.MavenProject project
@Parameter(property="session", readonly=true) private org.apache.maven.execution.MavenSession session
@Parameter private java.util.List<Product> products
Selection of products to be installed and configuration per product.
If the project contains more than one product file, you need to choose for which ones you want to create distribution archives. If you choose to install more than one product, you need to specify the attachId (which becomes a part of the classifier) to make the classifiers unique. Example:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-p2-director-plugin</artifactId> <version>${tycho-version}</version> <executions> <execution> <id>create-distributions</id> <goals> <goal>materialize-products</goal> <goal>archive-products</goal> </goals> </execution> </executions> <configuration> <products> <product> <!-- select product with ID product.id; the archives get the classifiers "<os>.<ws>.<arch>" --> <id>product.id</id> </product> <product> <!-- select product with ID other.product.id for the classifiers "other-<os>.<ws>.<arch>" --> <id>other.product.id</id> <attachId>other</attachId> </product> </products> </configuration> </plugin>The following snippet shows the optional parameters which can be specified per product:
<configuration> <products> <product> <id>product.id</id> <!-- optional parameters --> <rootFolder></rootFolder> <rootFolders> <macosx></macosx> <linux></linux> <win32></win32> </rootFolders> </product> ... </products> </configuration>Details on the product-specific configuration parameters:
@Parameter(property="p2.timeout", defaultValue="0") private int forkedProcessTimeoutInSeconds
int getForkedProcessTimeoutInSeconds()
org.apache.maven.project.MavenProject getProject()
org.apache.maven.execution.MavenSession getSession()
BuildOutputDirectory getBuildDirectory()
java.io.File getProductsBuildDirectory()
java.io.File getProductMaterializeDirectory(Product product, TargetEnvironment env)
java.util.List<TargetEnvironment> getEnvironments()
ProductConfig getProductConfig() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
static java.lang.String getOsWsArch(TargetEnvironment env, char separator)