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 Copyright (c) 2008, 2011 Sonatype Inc. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Sonatype Inc. - initial API and implementation
tycho-packaging:package-plugin Creates a jar-based plugin and attaches it as an artifact
tycho-packaging:package-target-definition Registers the target definition file <artifactId>.target expected in the basedir of a project as maven artifact.
tycho-packaging:product-export Copyright (c) 2008, 2012 Sonatype Inc. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Sonatype Inc. - initial API and implementation
tycho-packaging:update-site Copyright (c) 2008, 2011 Sonatype Inc. and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Sonatype Inc. - initial API and implementation
tycho-packaging:update-site-packaging Copyright (c) 2010, 2011 SAP AG and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: SAP AG - initial API and implementation
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.

System Requirements

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

Maven 3.0
JDK 1.6
Memory No minimum requirement.
Disk Space No 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.22.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.22.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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