kutschkem
kutschkem

Reputation: 8163

Cross-Project Versioning for Eclipse Plugins

i have multiple Elipse plugin projects that depend on each other. Several questions concerning that:

1) If i change the version number of one plugin, is it somehow possible to automatically update the plugin.xml files of the dependent plugins to reflect the version number change?

2) The same for Maven pom's: can i somehow automatically update the pom's when i change version numbers?

3) If i want to keep plugin.xml and pom.xml version numbers consistent, is there an automatic way to do so?

4) and last: If i have multiple projects that should have the same version numbers, can i somehow sync the version numbers?

Upvotes: 0

Views: 138

Answers (2)

kutschkem
kutschkem

Reputation: 8163

As pointed out by khmarbaise, there is Tycho, which is a maven plugin that works as bridge between maven and eclipse plugins.

Those two links provide the information needed to achieve what i asked in my question:

https://docs.sonatype.org/display/M2ECLIPSE/Staging+and+releasing+new+M2Eclipse+release

http://software.2206966.n2.nabble.com/Incrementing-updating-release-version-of-plugins-while-generating-p2-site-td5929658.html

It seems like you need to use the command

mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=<version>

which should set all versions of the parent pom, the modules, and the plugin.xml 's to the given version.lik

Upvotes: 0

s.d
s.d

Reputation: 4185

Using the Maven Release Plugin - and especially the update-versions goal - may solve at least some of the issues you have addressed.

From the documentation at http://maven.apache.org/:

In some situations you may want an easy way to update the version numbers in each POM of a multi-module project. The update-versions goal is designed to accomplish this.

To update the version numbers in your POMs, run:

mvn release:update-versions

You will be prompted for the version number for each module of the project. If you prefer that each module version be the same as the parent POM, you can use the option autoVersionSubmodules.

mvn release:update-versions -DautoVersionSubmodules=true

In this case you will only be prompted for the desired version number once.

Upvotes: 1

Related Questions