Hello!

I have a problem with "Export-Package" directive.

I have a bundle, which contains package "groovy.lang". This package contains only one class, which I need to access protected method in class in groovy library.

I have another bundle "com.springsource.org.codehaus.groovy", which exports packages "groovy.lang, org.codehaus.groovy" and etc.

When I start maven-bundle-plugin, it adds classes from bundle "com.springsource.org.codehaus.groovy" from package "groovy.lang" to my bundle, because my bundle has this package to.

On the felix site I found example of such case:

 <Export-Package>org.osgi.service.log</Export-Package>

"Notice that the <Export-Package> instruction specifies that the bundle exports the Log Service package, even though this package is not contained in the bundle project. By declaring this, the plugin will copy the Log Service package into the resulting bundle JAR file. This is useful in this case because now the bundle can resolve without having to download the entire compendium bundle."

How I can prevent copying additional jar classes to my bundle? I need to import "groovy.lang" package into my bundle and merge it with my "groovy.lang" package so that the classes, which are not exist in my "groovy.lang" would be loaded from "com.springsource.org.codehaus.groovy", and classes, which exist in my "groovy.lang" package would be loaded from my bundle.

Reply via email to