Build automation has always been considered painful, especially for complex builds. So, it seemed like a good idea to change that and come up with a solution that would be easy to use. I want to introduce you to Tycho, the next generation of Maven plugins and tools for building Eclipse plugins and RCP applications.
Tycho supports two common development workflows:
- In manifest-first mode, the developer explicitly creates and maintains OSGi manifest and other Eclipse/OSGi metadata, usually using Eclipse PDE UI.
- In pom-first mode, OSGi metadata is generated by the build, based on information available from Maven’s pom.xml.
In manifest-first mode, Tycho directly uses PDE/JDT metadata, e.g. META-INF/MANIFEST.MF. Project dependencies are calculated dynamically at build time using OSGi rules. It supports all attributes supported by Eclipse OSGi resolver (Require-Bundle, Import-Package, Eclipse-GenericRequire, etc.) and uses proper classpath access rules during compilation. This allows it to avoid duplicating metadata between Maven’s pom.xml files and Eclipse/OSGi config files.
The pom-first mode provides a set of features similar to the Bnd tool. The major difference from Bnd is the support for Eclipse-friendlier Require-Bundle and support for multiple related OSGi bundles.
In both modes, Tycho supports remote repositories for downloading dependencies and deploying result artifacts. Currently, support for Maven artifact repositories and P2 repositories is in the works.
Tycho can already build Eclipse plugins and features, and update sites and RCP applications. Tim wrote a nice introduction that can help to get started using Tycho on existing Eclipse projects.
One of Tycho’s objectives was to support continuous build for the M2E project (the Maven support for Eclipse) and we are planning to make Tycho, PDE, and M2E work nicely together using M2E’s project configuration framework which I am planning to describe in one of the following posts. Stay tuned.