Tycho Tutorials
1 Building plug-ins
2 Global maven settings
3 Global build project
4 Building features
5 Building p2 update sites
6 Building products
7 Plug-in unit tests
8 Using target platforms
9 Updating version numbers
Source code for this tutorial is available on googlecode as a single zip archive, as a Team Project Set or you can checkout the SVN projects directly.
Step 1: Convert feature project to maven project
The feature com.example.tycho.plugin.feature already includes our plug-in com.infineon.tycho.plugin. The only thing to do is convert the feature project to a maven project. Do this using the context menu Configure/Convert to Maven Project. I guess you are familiar with the procedure right now.
Make sure you set Packaging to eclipse-feature.
Now open the pom file of your releng project (com.example.tycho.releng/pom.xml) and add our feature project as a new module. Don't forget to check Update POM parent section in selected projects.
As before you will see an error marker on your feature project. To get rid of it switch to the Problems View, locate the error and use the quick fix feature to solve it.
Run your build to verify your settings.

Hello,
ReplyDeleteGreat tutorials, thank you!
Maybe a stupid question, but why do I need to build a featrue.xml at all? What is the output? Features.xml is a collection of other bundles, do I get all of these jared in the target folder? Cant try it still get an error: Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.16.0:validate-version (default-validate-version) on project com.example.tycho.plugin.feature: OSGi version 1.0.0 in feature.xml does not match Maven version 0.0.1 in pom.xml -> [Help 1]
Features are used to cluster bundles to convenient units. P2 will show features to your users, it will not show bundles which can be selected for install. You might want to keep your code in multiple bundles (eg UI/non UI) but still they serve the same topic (like Java programming). Then features are used to put it all together.
DeleteRegarding your error: seems the version number in your pom is 0.0.1.SNAPSHOT. Change it to 1.0.0.SNAPSHOT as in the screenshot above