On Thu, Nov 3, 2011 at 11:56 PM, Stuart McCulloch <[email protected]> wrote:
> On 3 Nov 2011, at 04:37, Adrien Ragot wrote:
>
>> Hi,
>>
>> I'm trying to upgrade from maven-bundle-plugin 2.2.0 to 2.3.4 (they
>> both use Bnd-1.15.0), and I'm checking there is no regression in the
>> generated MANIFEST.MF.
>> As far as I can see, Import-Package is not calculated as I expected. I
>> suspect Bundle-ClassPath is not read anymore. Was there any change in
>> this revision?
>
> The main change affecting the manifest goal between 2.2.0 and 2.3.4 was to 
> use the "supportedProjectTypes" parameter to decide whether to use the BND 
> builder approach (which uses the given instructions to assemble the content 
> and in doing so generates the manifest) versus using the BND analyzer 
> approach (which looks for an existing archive attached to the project and 
> extrapolates the manifest from its contents). The difference in the final 
> manifest is all to do with how these two approaches analyze the project 
> classpath. For example, since there's no instruction to include the 
> dependency jar mentioned in the Bundle-ClassPath in the bundle and that jar 
> is not located relative to the project,

Is there a way to do it?
My only goal is to write the manifest. We don't use BND's builder, we
just use it to create the archive.

As I understand, this would make BND consider all Maven dependencies
are part of the classpath to analyze. If I want to strictly keep the
former manifest, I can get rid of the Embed-Dependency header using
_removeheaders:

  <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
  
<_removeheaders>Include-Resource,Private-Package,Embed-Dependency</_removeheaders>
  (and no Bundle-ClassPath anymore)

The drawback is it writes the Bundle-ClassPath differently (it writes
myjar.jar, instead of our WEB-INF/lib/myjar.jar). Is there a way to
prevent BND from modifying the Bundle-ClassPath header we write?
Can you foresee any drawback of using this method? Do you still want
me to raise an issue?

Thank you,
Adrien

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to