Class AbstractProductMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.plugins.p2.director.AbstractProductMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DirectorMojo
,ProductArchiverMojo
abstract class AbstractProductMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description AbstractProductMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) BuildDirectory
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()
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
project
@Parameter(property="project", readonly=true) private org.apache.maven.project.MavenProject project
-
session
@Parameter(property="session", readonly=true) private org.apache.maven.execution.MavenSession session
-
products
@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> <freebsd></freebsd> <win32></win32> </rootFolders> </product> ... </products> </configuration>
Details on the product-specific configuration parameters:- rootFolder - The path where the installed product shall be stored in the archive, e.g. "eclipse". By default, the product is stored in the archive root.
- rootFolders - OS-specific installation root folders, overriding rootFolder. Allowed children are <macosx>, <win32>, <linux> and <freebsd> or any other OS supported by p2. Since 0.18.0
-
forkedProcessTimeoutInSeconds
@Parameter(property="p2.timeout", defaultValue="0") private int forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.
-
-
Method Detail
-
getForkedProcessTimeoutInSeconds
int getForkedProcessTimeoutInSeconds()
-
getProject
org.apache.maven.project.MavenProject getProject()
-
getSession
org.apache.maven.execution.MavenSession getSession()
-
getBuildDirectory
BuildDirectory getBuildDirectory()
-
getProductsBuildDirectory
java.io.File getProductsBuildDirectory()
-
getProductMaterializeDirectory
java.io.File getProductMaterializeDirectory(Product product, TargetEnvironment env)
-
getEnvironments
java.util.List<TargetEnvironment> getEnvironments()
-
getProductConfig
ProductConfig getProductConfig() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getOsWsArch
static java.lang.String getOsWsArch(TargetEnvironment env, char separator)
-
-