felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-1571) Bundle-ClassPath without "." while using maven-bundle-plugin in a war project confuses the plugin
Date Wed, 16 Sep 2009 08:48:01 GMT

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

Stuart McCulloch updated FELIX-1571:

    Fix Version/s: maven-bundle-plugin-2.1.0

Correct, if you're using the manifest goal and all you have at the time is the compilation
classpath then without the "." bnd won't see the compiled classes in the build directory -
the WAR might put the classes in a different subdirectory, but that's not how they're laid
out at the time the manifest goal runs. Normally an Include-Resource instruction would fix
this, but this doesn't work properly unless bnd is actually going to generate the bundle (the
manifest goal uses bnd as an analyzer rather than a builder).

Questions 1 & 2 are related in that there's a chicken and egg situation - you want to
generate a manifest based on how classes are laid out inside the WAR, but you want the manifest
generated before you create the WAR. 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...

Anyway this is definitely a new feature, so assigning it to the next feature release of the

> 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
>             Fix For: maven-bundle-plugin-2.1.0
>         Attachments: test.zip
> 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.
You can reply to this email to add a comment to the issue online.

View raw message