[ 
https://issues.apache.org/jira/browse/FELIX-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057660#comment-13057660
 ] 

Sahoo commented on FELIX-1571:
------------------------------

Yes, with the fix to FELIX-2934, "." no longer appears in BCP. I modified the 
original test case to not specify any Bundle-ClassPath instruction to 
maven-bundle-plugin. With that change, maven-bundle-plugin-2.3.5-SNAPSHOT is 
now able to generate correct Bundle-ClassPath and Import-Package. So, the two 
questions I raised in the bug are addressed with the latest 2.3.5-SNAPSHOT.

With all the recent fixes to maven-bundle-plugin, things have improved quite a 
lot. Generating skinny WABs is really straight forward now. But, I think there 
is some duplication of configuration information which can lead to subtle 
errors when there are dependencies embedded in WEB-INF/lib. The duplication 
comes into picture when "war" packaging type is used to make the eventual war, 
but manifest goal of maven-bundle-plugin is used to generate the OSGi metadata. 
One has to ensure that correct Embed-Dependency instruction is specified which 
is a duplication of information known to war plugin. So, I agree with the 
following comment you made earlier in this bug:

"I think the proper solution may be to create a new feature that lets you 
update the manifest in the generated project artifact. That way you have the 
WAR artifact available, so bnd can produce the right manifest (and verify it) - 
although one outstanding issue is this might affect signing... "

Instead of marking this bug as fixed, should we turn into a feature request? It 
will be really handy if one can just wrap the output of maven-war-plugin to 
make an OSGi bundle. In fact, the same should be possible for any other 
packager's output. It may have the limitation of not able to generated signed 
artifact. 

Comments/thoughts?

> Bundle-ClassPath without "." while using maven-bundle-plugin in a war project 
> confuses the plugin
> -------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1571
>                 URL: https://issues.apache.org/jira/browse/FELIX-1571
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.0
>            Reporter: Sahoo
>            Assignee: Stuart McCulloch
>             Fix For: maven-bundle-plugin-2.3.5
>
>         Attachments: test.zip, wicket-cdi.tar.gz
>
>
> 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? 
> Please see the attached test case. I want to know two things:
> 1. How to configure bundle plugin to generate Bundle-ClassPath that contains 
> WEB-INF/classes and WEB-INF/lib/*.jar, but "." should not be part of the 
> classpath?
> 2. How to configure bundle plugin to generate Import-Package statements for 
> classes packaged in WEB-INF/lib/*.jar?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to