felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eamonn Maguire <eamonn.magu...@st-annes.ox.ac.uk>
Subject Re: Dependencies, Exports and Imports Query
Date Mon, 19 Sep 2011 21:35:00 GMT

Thank you for your prompt response. So, I tried that and the following problems have come

[ERROR] Error building bundle org.isatools.plugins:isavalidatorconvert:bundle:1.0 : Exception:
Not a valid class file (no CAFEBABE header)

The edited pom.xml file I'm using is here: https://gist.github.com/1227576


On 19 Sep 2011, at 22:22, <mvangeertruy@comcast.net<mailto:mvangeertruy@comcast.net>>


The dependencies section is only really used to build your .jar file when you have pakcages
external to your bundle included in the Export-Package section of your maven-bundle plugin.
 I believe the reason that you're experiencing the bundling of your .jar file with your bundle
is because of your maven-assembly-plugin implementation.

What I would suggest you do is change your packaging type to "bundle", comment out your maven-assembly-plugin
section and attempt to compile again. The maven-bundle-plugin will take care of most of the
stuff you're trying to do in your maven-assembly-plugin and is a cleaner approach. This will
also ensure that you don't get erroneous dependant .jar files compiled in with your application.

The dependancy is still needed if you have references to that external library in your Import-Package
section of your maven-bundle-plugin implementation.

So, in short, keep the dependancy, and comment out your maven-assembly-plugin code.

Please let me know if that helps!

----- Original Message -----

From: "Eamonn Maguire" <eamonn.maguire@st-annes.ox.ac.uk<mailto:eamonn.maguire@st-annes.ox.ac.uk>>
To: users@felix.apache.org<mailto:users@felix.apache.org>
Sent: Monday, September 19, 2011 5:06:24 PM
Subject: Re: Dependencies, Exports and Imports Query

Ah, I should have mentioned that BIIObjectStore is in the org.isatools.tablib.utils package.

Thanks again,


On 19 Sep 2011, at 21:58, Eamonn Maguire wrote:

Hi all,

I'm new to OSGi, I just started implementing before the weekend and although the process was
relatively pain free, I'm having some problems with getting plugins to work without having
all my dependencies in the host project.

For the plugin I'm using, the pom.xml file can be seen here: https://gist.github.com/1227576

For the dependencies:

1) The ISAcreator dependency is the actual host program, where the plugins are to be deployed.
2) The import_layer artifact is used for validation and conversion, which the plugin does
and contains a class called BIIObjectStore (this becomes relevant below). It is NOT an OSGi

The problem
Everything is working as long as the import_layer dependency is in the host pom.xml dependencies,
but this defeats the purpose of the plugin. But when it's not included, I get a classnotfoundexception
when I attempt to execute the code in the plugin (there are no complaints when felix starts
and the plugin is loaded). I'm not totally sure why it's not working since the resulting jar
produced when I run mvn clean install contains the class. It's just not being 'seen' when
it is executed.

The plugin configuration as seen in the file is probably not doing something right, and as
you can see, the current version of that file is doing everything.

Any help would be greatly appreciated. I feel like I'm banging my head against a brick wall
on this one.

Many thanks,

Eamonn Maguire

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message