You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2009/09/07 16:26:48 UTC

Re: Bundle-ClassPath without "." while using maven-bundle-plugin and maven-war-plugin together

Stuart McCulloch wrote:
> 2009/6/13 Sahoo <Sa...@sun.com>
>
>   
>> I am using a war type project, so the packaging is governed by
>> maven-war-plugin. For the OSGi meta data in the war, I am using manifest
>> goal of maven-bundle-plugin in process-classes phase. Yes, I have already
>> looked at the excellent examples on this use case at [1]. However, my use
>> case has one difference. I don't want "." in Bundle-ClassPath. Why? Because,
>> it should never be. Files at the root level of .war file is never used
>> directly by class loaders in web container; WEB-INF/classes and
>> WEB-INF/lib/*.jar are used instead. As soon as I remove the "." from
>> Bundle-ClassPath settings, bundle plugin is confused. I don't know why  "."
>> is necessary for bundle plugin to generate meta data? My guess is without
>> it, it does not find any classes in the target dir?
>>     
>
>
> if you want to use the bundleplugin to build the WAR file then you need
> to use Embed-Dependency (or the raw Bnd Include-Resouce instruction)
> so that the classes end up in the right location(s) inside the WAR bundle
> - then when Bnd analyzes the Bundle-ClassPath it will find the classes
>   
I will explore this option, but let's focus on using war plugin to do 
the packaging and bundle plugin to generate the manifest.
> if you want to use the bundleplugin to generate the manifest, and you
> want a Bundle-ClassPath without '.' then I suspect you'll need to have
> the WAR file laid out under "target/classes" (or somewhere else that
> you could add to the Bnd classpath by using its -classpath setting)
>   
In fact, war plugin already creates an exploded directory called 
target/${finalName}/ with the war content in it. I suspect it is created 
after bundle is run, so bundle plugin can't see the contents even if I 
appropriate set <_classpath/>.

Thanks,
Sahoo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org