I agree with JB - this is simply a case of binding to a different lifecycle 
phase from normal. 

Move both to prepare-package (or before) and ensure that you declare the shade 
plugin before the bnd plugin in the source. You may have unit test issues if 
you try to use the shading before the unit tests have run as I don't think that 
shade changes the test bytecode.

Tim

Sent from my iPhone

> On 3 Nov 2016, at 07:31, Jean-Baptiste Onofré <j...@nanthrax.net> wrote:
> 
> Hi Christian,
> 
> When you changed the execution phase, did you specify the goal and changed 
> the packaging (at least for the maven-bundle-plugin) ?
> 
> Regards
> JB
> 
>> On 11/03/2016 08:16 AM, Christian Schneider wrote:
>> I am currently trying to provide bundle creation for some libraries and
>> found a major obstacle.
>> 
>> Some projects use the maven-shade-plugin to embed some dependencies
>> while moving them to a different package.
>> See 
>> https://github.com/awaitility/awaitility/blob/master/awaitility/pom.xml#L49-L80
>> 
>> The problem is that the maven-bundle-plugin or bnd-maven-plugin are
>> executed before the shade. So they analyse the state without the embeded
>> dependencies.
>> 
>> I was able to work around this by just manually switching off the
>> imports for the embedded packages but this does not seem to be a clean way.
>> 
>> Is there a good way to integrate shade and bundle creation so I do not
>> have to do workarounds?
>> I have tried to change the phase of the plugins but was not able to get
>> it work that way.
>> 
>> Christian
>> 
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>
>> 
>> Open Source Architect
>> http://www.talend.com
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
>> 
>> 
>> _______________________________________________
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to