Keeping version numbers consistent is a tedious task. But help is on the way: let tycho do this for you!
Tycho Tutorials
For a list of all tycho related tutorials see Tycho Tutorials Overview
Source code for this tutorial is available on github as a single zip archive, as a Team Project Set or you can browse the files online.
Step 1: Add tycho-versions plugin
Open your master pom file and add a new plugin section within the project/build/plugins node:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-versions-plugin</artifactId> <version>${tycho.version}</version> </plugin>
Step 2: Execute new maven target
Go to the project com.codeandme.tycho.releng, right click and select Run As/Maven build.... Set tycho-versions:update-pom in Goals and execute maven. Now all your pom file version numbers will be updated according to the plug-in and feature version numbers.
It'd be useful to have an overview of where version numbers are kept. What happens when you've got two plugins, for example? Seems like there are three version numbers; one for each plugin and one for the parent.
ReplyDeleteHello all,
ReplyDeleteHelp! what's wrong?! The above sample only updates the first project, every other is skipped! It only updates the parent pom, which doesn't make sense really. Is there any special directive to update all child poms, please see:
[INFO] Reactor Summary:
[INFO]
[INFO] com.example.tycho.releng .......................... SUCCESS [0.150s]
[INFO] com.example.tycho.plugin2 ......................... SKIPPED
[INFO] com.example.tycho.plugin .......................... SKIPPED
[INFO] com.example.tycho.plugin.feature .................. SKIPPED
Thank you,
Tony
Hello all again,
ReplyDeleteSorry, I got confused by the info message, of course the child poms are not executed. Update version process is executed properly only by the releng project.
bye, Tony
I want to export the product in an arbitrary version, like 1.2.0.MYCUSTOMER
ReplyDeleteI tried the mvn goals: clean tycho-versions:set-version install
with parameter newVersion=1.2.0.MYCUSTOMER
For that I have to add to releng pom.xml
org.eclipse.tycho
tycho-packaging-plugin
${tycho.version}
false
The build is successfull, but at my local maven repository I only see all artifacts with version 1.0.0-SNAPSHOT .
In the log I see, that at a certain point of time the product is installed in my preferred version, but where ??
mvn log: http://static.klarblick.org/mvn_tycho_release.log
were your local pom files upgraded to the new version?
ReplyDelete