I've been struggling with a problem for a few days now. I am trying to build a bundle using maven. Although I'm new to maven, I think the problem seems legitimate.

I'll explain the problem with a contrived example. This bundle (we'll call it bundle A) is dependent on a bundles provided by the OSGi environment. This bundle is constructed in a fashion that is causing me significant trouble.

Bundle B has the following contents:
./META-INF/MANIFEST.MF
./classes/func1.jar
./classes/func2.jar
...etc....

In the manifest file, there is a Bundle-ClassPath entry that looks like this:

Bundle-ClassPath: classes/, ,classes/func1.jar, classes/func2.jar

The manifest also has an Export-Package section that looks somewhat like this:

Export-Package: com.nick.func1, com.nick.func2

Thus, the bundle is exporting the functionality of the jars out through a bundle as com.nick.func1 resides in func1.jar. Bundle B is not build by my team and is not created using Maven. It is put into our repository automatically by the eclipse:to-maven goal.

Now, my bundle A is dependent on package com.nick.func1. Since this is exported by bundle B, I add bundle B to my maven pom.xml as a provided dependency. I can see that bundle B is added to the classpath call during the maven compile by adding the debug parameter, but the compilation of bundle A fails saying package com.nick.func1 cannot be found. I can only imagine this is because the class loader is not considering the Bundle-ClassPath of bundle B for possible inclusion into the classpath for compilation of A.

The eclipse workbench seems to be able to handle this situation, but we'd really like to use Maven to do the compile. Has anyone seen this problem before that can suggest a workaround?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to