Plugin Documentation

Goals available for this plugin:

Goal Description
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 concatenation of ${unqualifiedVersion} and ${buildQualifier}, if not empty, is assigned to the project property qualifiedVersion.

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-feature No description.
tycho-packaging:package-iu Creates the zip for the IU and attaches it as an artifact
tycho-packaging:package-plugin Creates a jar-based plugin and attaches it as an artifact
tycho-packaging:package-target-definition Registers all target definition files in the basedir of a project as maven artifact.
tycho-packaging:update-consumer-pom Updates the pom file with the dependencies from the tycho model. If you further like to customize the pom you should take a look at the Maven Flatten Plugin

See also Build vs Consumer POM

tycho-packaging:validate-id Validates that project Maven and OSGi ids match.
tycho-packaging:validate-version Validates 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.
tycho-packaging:verify-osgi-pom This mojo verifies the pom of the project that is can be resolved against your build repositories and that all resolved dependencies can be used inside OSGi without any missing requirements.

System Requirements

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

Maven 3.9.0
JDK 17

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>4.0.1</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>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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