Question

I want to include org.eclipse.uml2.uml_4.0.0.v20120604-0919.jar in a Maven module. I've set up the p2 repository

<repository>
    <id>juno</id>
    <layout>p2</layout>
    <url>http://download.eclipse.org/releases/juno</url>
</repository>

and configured the Tycho build extension. Which groupdId and artifactId do I have to use so that Tycho will include org.eclipse.uml2.uml_4.0.0.v20120604-0919.jar as a dependency?

Was it helpful?

Solution

In Tycho, you need to specify the dependencies of your plug-in in the OSGi manifest file (META-INF/MANIFEST.MF). So for the given Eclipse plugin, you would write something like

Require-Bundle: org.eclipse.uml2.uml

You cannot do the same through POM configuration.

The idea behind this is that Tycho follows the so-called Manifest-first approach. The primary configuration files for Tycho are the OSGi manifest and the other Eclipse PDE file formats (like feature.xml, *.product files, etc.).

Other tools, like the maven-bundle-plugin follow the POM-first approach of building OSGi bundles. For the maven-bundle-plugin, you'd need to specify the dependencies in the POM, and the manifest is generated accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top