Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Thirdparty POM dependencies with m2e

Hello!

I'm quite new with Tycho. My goal is to use allow my Eclipse plug-ins to use third party libraries defined in a POM file. My environment is Eclipse Kepler on a Linux machine.

I started working based on this tutorial: http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts. I understand that I need a two-phase build, first for POM-first and then manifest-first projects. Setting up the pomfirst-bundle and the tycho.demo.itp02.bundle projects was pretty straightforward and I managed to get them work.

The pomfirst-thirdparty project displayed the following error in Eclipse:

Lifecycle mapping "org.sonatype.tycho.m2e.wrapperBundle" is not available. To enable full functionality, install the lifecycle mapping and run Maven->Update Project Configuration.

However, I could not find this in the m2e Marketplace or on the web. Deleting the <plugin> element for org.eclipse.m2e:lifecycle-mapping makes the error go away and makes it possible to use Maven install on the project.

I tried to import the org.codehaus.plexus.util package from tycho.demo.itp02.bundle by adding the following lines to the bundle's manifest file:

Require-Bundle: tycho.demo.itp02.pomfirst-thirdparty;bundle-version="1.0.0"
Import-Package: org.codehaus.plexus.util;version="2.0.7"

This way, instead of using the PomFirst wrapper class, I could use the StringUtils class directly. However, I cannot import the appropriate package from the Java code ("the import ... cannot be resolved").

Can you provide me some pointers on how to do this?

Thanks,
Gabor

Back to the top