You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Guillaume Sauthier (OW2)" <gu...@ow2.org> on 2012/07/11 14:54:38 UTC
Local packages are not included into my bundle
Hi all
I'm using maven-bundle-plugin 2.3.7 to wrap a library (thus using
Embed-Dependency).
As I need to patch some files in the original archive, I have duplicated
and modified java classes from the original module in my src/main/java.
It really looks like this thread:
http://mail-archives.apache.org/mod_mbox/felix-users/201110.mbox/%3C4EA9802A.2030707@googlemail.com%3E
After having excluded from the inlining the patched classes, I was
expecting to see my patched versions of the classes in the bundle.
But it was not the case.
Here is a concrete example to help understand the issue:
src/main/java/
org.mule.impl.MuleEvent
org.mule.providers.AbstractConnector
org.mule.providers.SimpleRetryConnectionStrategy
instructions.bnd
Embed-Dependency
mule-core;inline=!**/MuleEvent.class|!**/AbstractConnector.class|!**/SimpleRetryConnectionStrategy*.class
-exportcontent org.mule.*;version=${mule.version}
In this usecase, neither of the patched MuleEvent, AbstractConnector or
SRCStrategy ends up in my bundle.
I then tried with on excluding MuleEvent:
instructions.bnd
Embed-Dependency mule-core;inline=!**/MuleEvent.class
-exportcontent org.mule.*;version=${mule.version}
This time, MuleEvent is really excluded, I do not see it anymore in my
bundle, but I don't see my patched MuleEvent too ...
It looks like the local packages are not included in my bundle !
Any idea why ?
Is it the -exportcontents directive that remove the local packages ?
The only solution I found to finally include my patched files in the bundle
was to use Export-Package instead of -exportcontents
Except that this solution only work for me when I want to exclude 1 file,
if multiple exclusions are required, that do not work anymore (probably
another issue).
Thanks
--Guillaume