Plugin Documentation

Goals available for this plugin:

GoalDescription
tycho-packaging:build-qualifier

This mojo generates the build qualifier according to the rules described in the PDE documentation:

  1. Explicit -DforceContextQualifier command line parameter
  2. forceContextQualifier from ${project.baseDir}/build.properties
  3. A time stamp in the form YYYYMMDDHHMM (e.g. 200605121600)


The generated qualifier is assigned to buildQualifier project property. The unqualified project version is assigned to unqualifiedVersion project property. The unqualified version is calculated based on ${project.version} and can be used for any Tycho project and regular Maven project. Different projects can use different formats to expand the timestamp (not recommended).

The timestamp generation logic is extensible. The primary use case is to generate build version qualifier based on the timestamp of the last project commit. Here is example pom.xml snippet that enables custom timestamp generation logic

...
<plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>tycho-packaging-plugin</artifactId>
   <version>${tycho-version}</version>
   <dependencies>
     <dependency>
       <groupId>timestamp-provider-groupid</groupId>
       <artifactId>timestamp-provider-artifactid</artifactId>
       <version>timestamp-provider-version</version>
     </dependency>
   </dependencies>
   <configuration>
     <timestampProvider>custom</timestampProvider>
   </configuration>
</plugin>
...

tycho-packaging:build-qualifier-aggregator

This mojo calculates build timestamp as the latest timestamp of the project itself and timestamps of bundles and features directly included in the project. This is meant to work with custom timestamp providers and generate build qualifier based on build contents, i.e. the source code, and not the time the build was started; rebuilding the same source code will result in the same version qualifier.

Timestamp of included bundles and features is determined by parsing their respective version qualifiers. Qualifiers that cannot be parsed are silently ignored, which can result in old version qualifier used even when aggregator project contents actually changed. In this case aggregator project timestamp will have to be increased manually, using artificial SCM commit for example.

Qualifier aggregation is enabled only for projects with custom timestamp provider, i.e. <timestampProvider> is set in pom.xml to a value other than "default". The default build timestamp provider uses build start time as build timestamp, which should be newer or equal than timestamp of any included bundle/feature project, which makes qualifier aggregation redundant.

tycho-packaging:package-featureNo description.
tycho-packaging:package-pluginCreates a jar-based plugin and attaches it as an artifact
tycho-packaging:package-target-definitionRegisters the target definition file <artifactId>.target expected in the basedir of a project as maven artifact.
tycho-packaging:product-exportNo description.
tycho-packaging:update-siteNo description.
tycho-packaging:update-site-packagingNo description.
tycho-packaging:validate-idValidates that project Maven and OSGi ids match.
tycho-packaging:validate-versionValidates project Maven and OSGi versions. For SNAPSHOT versions, OSGi version qualifier must be ".qualifier" and unqualified Maven and OSGi versions must be equal. For RELEASE versions, OSGi and Maven versions must be equal.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven3.0
JDK1.5
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.tycho</groupId>
          <artifactId>tycho-packaging-plugin</artifactId>
          <version>0.20.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-packaging-plugin</artifactId>
        <version>0.20.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"