[ 
https://issues.apache.org/jira/browse/FELIX-1184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stuart McCulloch resolved FELIX-1184.
-------------------------------------

       Resolution: Invalid
    Fix Version/s:     (was: maven-bundle-plugin-2.0.1)

This is more of a configuration issue than a defect in the bundleplugin.

Basically Bnd (and therefore the bundleplugin) uses a "pull" approach to 
assemble the bundle.
In order to pull classes into the bundle, the Export-Package / Private-Package 
instructions need
to match the packages in the build directory.

So if you want to shade/obfuscate the bundle you have 3 choices:

   1)  build the bundle with the bundleplugin, obfuscate/shade it, and fix the 
packages in the manifest

   2)  obfuscate/shade the project, unpack to the build directory, re-package 
using the bundleplugin

   3)  obfuscate/shade etc., unpack to build directory, generate a new manifest 
with the bundleplugin

As long as the Bnd instructions match the package names in the build directory, 
it should work.

> maven-bundle-plugin does not play well with maven-shade-plugin relocate
> -----------------------------------------------------------------------
>
>                 Key: FELIX-1184
>                 URL: https://issues.apache.org/jira/browse/FELIX-1184
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.0
>            Reporter: David Jencks
>            Assignee: Stuart McCulloch
>
> maven-shade-plugin v 1.2.1
> If your build runs shade to relocate some classes from a preexisting jar and 
> the maven-bundle-plugin to geinerate osgi metadata the bundle plugin refuses 
> to generate any Export-Package, Import-Package or Private-Package headers. I 
> assume it doesn't find any classes.
> I don't know whose fault this is.
> To see this in action check out 
> https://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-asm-shaded rev 
> 778992 and uncomment the bundle plugin and comment the transformers section 
> of the shade plugin config.
> This is also reported as http://jira.codehaus.org/browse/MSHADE-51

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to