What does everyone think about releasing OSGi ready Log4j jars? OSGi is quickly becoming popular. In order for OSGi apps to depend on Log4j in an OSGi environment, certain MANIFEST.mf entries need to exist. There's a Maven plugin that performs the OSGi packaging called the "maven-bundle-plugin".

I'm not necessarily suggesting we get this in for 1.2.15, but maybe for the following release. The plugin would look something like the following (see below). This is based on Log4j bundles predefined at osgi.org [1] as well as looking at the Apache Felix project [2] and how the "maven-bundle-plugin" is used in that project. In addition to tweaking the <Export-Package> below, we may also want to define <Import-Package> and <Private-Package> (among other possible bundle manifest attributes to define).

The SLF4J project made their jar artifacts OSGi friendly. Seems like a good idea to do the same for Log4j.

Thoughts?

Jake


[1] http://www2.osgi.org/Repository/HomePage?cmd=browse&keywords=log4j&submit=search
[2] http://felix.apache.org/

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>1.1.0-SNAPSHOT</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Name>Log4j</Bundle-Name>
            <Bundle-Vendor>Apache Logging Log4j Project</Bundle-Vendor>
            <Bundle-Description>Log4j</Bundle-Description>
            <Export-Package>
               org.apache.log4j,
               org.apache.log4j.chainsaw,
               org.apache.log4j.config,
               org.apache.log4j.helpers,
               org.apache.log4j.jdbc,
               org.apache.log4j.jmx,
               org.apache.log4j.lf5,
               org.apache.log4j.lf5.config,
               org.apache.log4j.lf5.util,
               org.apache.log4j.lf5.viewer,
               org.apache.log4j.lf5.viewer.categoryexplorer,
               org.apache.log4j.lf5.viewer.configure,
               org.apache.log4j.lf5.viewer.images,
               org.apache.log4j.net,
               org.apache.log4j.nt,
               org.apache.log4j.or,
               org.apache.log4j.or.jms,
               org.apache.log4j.or.sax,
               org.apache.log4j.spi,
               org.apache.log4j.varia,
               org.apache.log4j.xml
            </Export-Package>
          </instructions>
        </configuration>
      </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to