Using maven dependencies on Eclipse plug-ins
Asked Answered
C

0

0

I would like to use a maven dependency in my Eclipse plug-in. What I've done so far is I added the dependency on my pom:

<dependency>
    <groupId>com.mandrillapp.wrapper.lutung</groupId>
    <artifactId>lutung</artifactId>
    <version>0.0.5</version>
</dependency>

And when I try to use the dependency I get the run time exception below (omitted the stack trace):

org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: com/microtripit/mandrillapp/lutung/MandrillApi
.
.
.
Caused by: java.lang.NoClassDefFoundError: com/microtripit/mandrillapp/lutung/MandrillApi
.
.
.
Caused by: java.lang.ClassNotFoundException: com.microtripit.mandrillapp.lutung.MandrillApi cannot be found by myplugin_1.0.0.qualifier

How can I solve this issue?

Candie answered 16/4, 2015 at 2:49 Comment(5)
The artifact you are referencing is not an OSGi bundle, so it cannot be used directly in a Tycho build. You need a separate build step first that converts the artifact to an OSGi bundle.Perfect
@Perfect I see, how can i build one? I found an example on eclipse website but it only works with the given example libraryCandie
Are you interested in OSGi wrappers in general, or do you only want to use the lutung library? This is not clear to me when reading the question.Perfect
@Perfect in general, lutung was just an example.Candie
You use pom-first approach or resolves dependencies trough MANIFEST.MF files ?Brainard

© 2022 - 2024 — McMap. All rights reserved.