[slf4j-dev] [OSGi] Manifests

John E. Conlon jconlon at verticon.com
Wed Jan 31 01:32:38 CET 2007


Peter Kriens' Bnd tool for OSGi bundle creation is a very handy tool for 
creating and verifying bundles. 
See:  http://www.aqute.biz/Code/Bnd

I used it to verify our maven created jars and it reported a couple of 
errors with our OSGi metadata.  Here is an example of the output from 
the tool:

<Snip> $ bnd print 
/home/jconlon/.m2/repository/org/slf4j/jcl104-over-slf4j/1.3-SNAPSHOT/jcl104-over-slf4j-1.3-SNAPSHOT.jar
Using bnd version 0.0.108
[MANIFEST jcl104-over-slf4j-1.3-SNAPSHOT.jar]
Archiver-Version             Plexus Archiver
Build-Jdk                    1.5.0_06
Built-By                     jconlon
Bundle-ClassPath             ., target/classes/
Bundle-ManifestVersion       2
Bundle-Name                  jcl104-over-slf4j
Bundle-SymbolicName          jcl104.over.slf4j
Bundle-Vendor                SLF4J.ORG
Bundle-Version               1.3-SNAPSHOT
Created-By                   Apache Maven
Export-Package               org.apache.commons.logging,  
org.apache.commons.logging.impl
Implementation-Title         jcl104-over-slf4j
Implementation-Version       1.3-SNAPSHOT
Import-Package               org.slf4j
Manifest-Version             1.0

[IMPEXP jcl104-over-slf4j-1.3-SNAPSHOT.jar]
Import-Package
  org.slf4j
Export-Package
  org.apache.commons.logging
  org.apache.commons.logging.impl
4 errors
1 : Bundle-Classpath directory must not end with a slash: target/classes/
2 : Cannot find a file or directory for Bundle-Classpath entry: 
target/classes
3 : Exporting packages that are not on the 
Bundle-Classpath[Jar:jcl104-over-slf4j-1.3-SNAPSHOT.jar]: 
[org.apache.commons.logging.impl, org.apache.commons.logging]
4 : Invalid value for Bundle-Version, 1.3-SNAPSHOT does not match 
[0-9]+(\.[0-9]+(\.[0-9]+(\.[0-9A-Za-z_-]+)?)?)?
4 warnings
1 : No sub JAR or directory .
2 : No sub JAR or directory target/classes/
3 : Importing packages that are never refered to by any class on the 
Bundle-Classpath[Jar:jcl104-over-slf4j-1.3-SNAPSHOT.jar]: [org.slf4j]
4 : Invalid value for Bundle-Classpath, ., target/classes/ does not 
match /?[^/"
]+(/[^/"
]+)*
</Snip>

Would it cause anyone any pain if we removed the Bundle-Classpath from 
our manifests? 

kind regards,
John




More information about the slf4j-dev mailing list