Plugin Documentation

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Description
tycho-versions:bump-versions This mojo allows configuration of an automatic version bump behavior in combination with the org.eclipse.tycho.extras:tycho-p2-extras-plugin:compare-version-with-baselines goal or similar. It works the following way:
  • You can either configure this in the pom (e.g. in a profile) with an explicit execution, or specify it on the command line like mvn [other goals and options] org.eclipse.tycho:tycho-versions-plugin:bump-versions
  • if the build fails with a VersionBumpRequiredException the projects version is incremented
  • one can now run the build again with the incremented version and verify the automatic applied changes
tycho-versions:set-parent-version

Updates the parent version in a pom file

tycho-versions:set-property

Updates some properties in a pom file

tycho-versions:set-version

Sets the version of the current project and child projects with the same version, and updates references as necessary.

The set-version goal implements a version refactoring for a Tycho reactor: When updating the version of a project, it consistently updates the version strings in the project's configuration files (e.g. pom.xml and META-INF/MANIFEST.MF) and all references to that project (e.g. in a feature.xml).

In many cases, the set-version goal changes the version of multiple projects or entities at once. In addition to the current project, child projects with the same version are also changed. The set of version changes is determined according to the following rules:

  • When the parent project of a project is changed and the project has the same version as the parent project, the project is also changed.
  • When an eclipse-plugin project is changed and the plugin exports a package with a version which is the same as the unqualified project version, the version of the package is also changed.
  • Require-Bundle and Fragment-Host Version Range in references to an eclipse-plugin that changed version will be updated:
    • if the newVersion becomes out of the original VersionRange
    • or if updateVersionRangeMatchingBounds is true and one of the bounds is matching the original version
  • When an eclipse-repository project is changed and a product file in the project has an equivalent version, the version in the product file is also changed.
tycho-versions:update-eclipse-metadata Update Eclipse/OSGi metadata (MANIFEST.MF, feature.xml, product.xml) version to match corresponding pom.xml.
tycho-versions:update-pom Update pom.xml version to match corresponding Eclipse/OSGi metadata.

System Requirements

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

Maven 3.9.6
JDK 17

System Requirements History

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

Plugin Version Maven JDK
from 4.0.0 to 4.0.9 3.9.0 17
from 3.0.0 to 3.0.5 - 17
from 2.0.0 to 2.7.5 - 11
from 0.25.0 to 1.7.0 - 8
from 0.23.0 to 0.24.0 - 7
0.22.0 - 6
from 0.12.0 to 0.21.0 - 5

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-versions-plugin</artifactId>
          <version>5.0.0-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-versions-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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