Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] m2e, bundle plugin and Embed-Dependency problem

If you are using relatively recent versions of all tools involved, then
embed-dependency is expected to work. Here is what m2e configuration
looks like


On 2013-07-16 7:12 PM, Alejandro.Endo@xxxxxxxxxxx wrote:
I tried using Embed-Dependency a long time ago and never managed to make it
work. Let us know if you succeed

The problem for me was that it worked only when you actually packaged the
jar (mvn package). In the generated jar you could see the dependency
classes and the packages were exported in the manifest as if it was another
package of the bundle. However, I never managed to make the dependency be
embedded in the exploded (pre-package) version: the one in target/classes.
Since this is the one that PDE uses, and not the jar itself, it didn't
work, it gave class not found errors, since the class was really not there
in target/classes

But I have to say I didn't try that hard to make it work

My workaround was to use the dependency plugin to unzip the dependency to
target/classes so that I could run it in eclipse.
Another workaround is to generate the jar with the embedded dependency and
then put it in your target platform folder, then in the launcher the bundle
would appear in the target platform section where it does accept jars. The
problem with this approach is that if the bundle is under heavy development
the workflow is not very nice since you have to package the jar after every
recompilation. Note I didn't try this, but based on my understanding, it
should work

Maybe someone else has a way to make BND or the Tycho configurator to take
the Embed-Dependency instruction and run it before the package phase?

Alejandro Endo | Software Designer/Concepteur de logiciels

From:	pubudu gunawardena <pubudupg@xxxxxxxxx>
To:	m2e-users@xxxxxxxxxxx,
Date:	2013-07-15 08:43 PM
Subject:	[m2e-users] m2e, bundle plugin and Embed-Dependency problem
Sent by:	m2e-users-bounces@xxxxxxxxxxx

Hi All,

I have a maven project which has packaging "bundle" and uses the maven
bundle plugin. The bundle plugin configuration contains an
Embed-Dependecies section as follows


I am using an "OSGi Framework" run configuration to run the project.
But when running the project from within Eclipse I get
NoClassDefFoundError for classes within the embedded dependencies. The
questions that I have is, does m2e support configuration like shown
above? If not, can someone point out an alternative way to do this?

I am using m2e 1.3.1 and my Eclipse version says "Version: Juno
Service Release 2".

Thanks in advance for any help.

m2e-users mailing list


Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.

Thank You.

m2e-users mailing list

Back to the top