Syncs MANIFEST.MF, build.properties and pom.xml for tycho builds. This is especially handesome if you have a lot of different bundles and want to keep poms and manifests in sync.
The current version is just a simple commandline tool. Maybe there will be an eclipse-plugin or hopefully a tycho-plugin.
Create an environment variable to run tycho-version-sync in any directory.
java -jar tycho-version-sync.jar
or give the directory as a parameter
java -jar tycho-version-sync.jar /path/to/project
For unix shell users
./tycho-version-sync
./tycho-version-sync /path/to/project
- Sync your
bundle-version
in the MANIFEST.MF with pom.xml<version>
element. - Sync your exported package versions with the
bundle-version
in the MANIFEST.MF or pom.xml - Update your imported packages / required bundles versions
- Update your qualifier in the build.properties file
There are some simple regex matching rules for selecting bundles:
com.example
:= selects only the bundle com.examplecom.example.*
:= selects com.example and all bundles starting with com.examplecom.example.+
:= selects all bundles starting with com.example without com.example- Empty string means all bundles
In order to keep your MANIFEST.MF
, exported-packages
and feature.xml
files and headers in sync with your pom.xml
you can run the following command
sync exported-packages versions with the bundle-version
header.
sync all
This is an abreveation for the following three commands.
sync exported-packages versions with the bundle-version
header.
sync exported-packages
sync bundle-version
with the version
attribute of the corresponding pom.xml
.
sync manifest
sync feature version
with the version
attribute of the corresponding pom.xml
.
sync feature
Setting all bundle versions to 1.0.0.qualifier
set bundle-version 1.0.0.qualifier
Setting bundle version for com.example bundle to 1.0.0.qualifier
set bundle-version com.example 1.0.0.qualifier
Setting bundle version for all bundles starting with com.example inclusive com.example bundle to 1.0.0.qualifier
set bundle-version com.example.* 1.0.0.qualifier
Setting bundle version for all bundles starting with com.example exclusive com.example bundle to 1.0.0.qualifier
set bundle-version com.example.+ 1.0.0.qualifier
Setting bundle version for com.example.core and com.example.core bundle to 1.0.0.qualifier
set bundle-version com.example.core com.example.ui 1.0.0.qualifier
Setting import-package version for com.example.dependency package to 1.0.0
set import-package com.example.dependency 1.0.0
Setting require-bundle version for com.example.bundle package to 1.0.0.
Note that this command will preserve all directives and attributes, like
resolution="optional"
or visibility:="reexport"
!
set require-bundle com.example.bundle 1.0.0
Will change
require-bundle: com.example;bundle-version="0.5.0";visibility:="reexport"
into
require-bundle: com.example;bundle-version="1.0.0";visibility:="reexport"
You can set all your features to a different version with one command
set feature 1.0.0
Of course all the common regular expressions work as well
set feature com.example.* 1.0.0
to set all features with id com.example.* to version 1.0.0.
Setting all existing qualifier properties in build.properties
to version none
set qualifier none