Am 22.02.2013 17:43, schrieb Thomas Neidhart:
On 02/22/2013 05:35 PM, Thomas Neidhart wrote:
On 02/22/2013 05:09 PM, Thomas Neidhart wrote:
On 02/20/2013 09:48 PM, Jörg Schaible wrote:
Hi Thomas,

Thomas Neidhart wrote:

On 02/20/2013 09:33 PM, Oliver Heger wrote:
Am 20.02.2013 16:42, schrieb t...@apache.org:
Author: tn
Date: Wed Feb 20 15:42:09 2013
New Revision: 1448251

URL: http://svn.apache.org/r1448251
Log:
Update version info

Modified:
      commons/proper/logging/trunk/src/conf/MANIFEST.MF

Modified: commons/proper/logging/trunk/src/conf/MANIFEST.MF
URL:

http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/conf/MANIFEST.MF?rev=1448251&r1=1448250&r2=1448251&view=diff


==============================================================================

--- commons/proper/logging/trunk/src/conf/MANIFEST.MF (original)
+++ commons/proper/logging/trunk/src/conf/MANIFEST.MF Wed Feb 20
15:42:09 2013
@@ -5,4 +5,4 @@ Specification-Version: 1.0
   Implementation-Title: Commons Logging
   Implementation-Vendor-Id: org.apache
   Implementation-Vendor: Apache Software Foundation
-Implementation-Version: 1.1.1
+Implementation-Version: 1.1.2


Just wondering whether this is necessary. Doesn't the maven build
automatically generate a fully configured MANIFEST including OSGi meta
data?

wondered about exactly the same.


yes, but somehow the ant build script is still in use (e.g. for gump)
and both ant & maven refer to this hard-coded manifest.

If Gump uses Ant here, this is just for historical reasons. Gump can use
Maven since quite some time now.

Ok, when I try to remove the hard-coded manifest, the
maven-bundle-plugin steps in and automatically creates one.

This is fine, but the Import-Package contains all (optional)
dependencies which are not marked like that.

I am not so familiar with these things, does somebody know how to
specify this?

Or would this not work at all, as already outlined in LOGGING-124?

After some research, I started with this:

       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
         <inherited>true</inherited>
         <configuration>
           <instructions>
             <Import-Package>*;resolution:=optional</Import-Package>
             <DynamicImport-Package>*</DynamicImport-Package>
           </instructions>
         </configuration>
       </plugin>

All dependencies are optional, so this should be fine.
I added the DynamicImport but this may be to generic, and has to be
limited to the actual packages that are loaded dynamically by the
discovery process.

Can anybody provide me with a simple test bundle to see if logging would
work when loaded in e.g. apache felix?

Well, I have not yet a clue about osgi, and I see that felix has
re-bundled commons-logging in a total different way:

http://svn.apache.org/repos/asf/felix/trunk/commons/commons-logging/pom.xml

It is said that the maven-bundle-plugin could determine optional dependencies automatically based on optional attributes in the maven dependencies. However, when I tried this the last time - about half a year ago - I could not get this to work.

The pom for [configuration] can be used as an example for an alternative approach. It declares a number of optional dependencies explicitly. This is done by setting the commons.osgi.import property (which is evaluated by the configuration of the maven-bundle-plugin inherited from the parent pom).

Oliver


Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to