Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Commons OSGi

The purpose of this page is to record progress in Commons of OSGi-enabled releases and any notes on specific issues with configuration of the OSGi manifest entries.

Wiki MarkupThe \[http://felix.apache.org/ Apache Felix\] project (an OSGi implementation) have \[http://commons.markmail.org/message/36xoo2bo5aabvy5c requested\] that Commons components include \[http://www.osgi.org/ OSGi\] meta data in their jars so that they are _ready-to-use_ in an OSGi environment. This involves OSGi entries in the jar's manifest file.unmigrated-wiki-markup

The Felix project has developed the \[http://felix.apache.org/site/maven-bundle-plugin-bnd.html maven-bundle-plugin\] which makes this easier and this is now configured in the {{commons-parent}} \[http://svn.apache.org/repos/asf/commons/proper/commons-parent/trunk/pom.xml pom.xml\] (since version 9) with _default_ instructions. For components which need to override the _default_ instructions, this can be done using _properties_ in the component pom (see below for more details)details).

SpringSource Bundle Repository

The SpringSource Enterprise Bundle Repository contains a collection of open source libraries and each jar file in the repository is a valid OSGi bundle. This includes a number of re-packaged Commons components, so if you require a component that has not yet been released as an OSGi bundle, you may find it in the SpringSource repository.

N.B. As of writing (May 2008) the status of SpringSource repository is BETA.

Proper

Component

Last Release

First OSGi release

Notes / Comments

attributes

2.2

 

No m2 build

beanutils

1.7.0

1.8.0 -BETA  

 

betwixt

0.8

 

 <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="22114989-014e-4b9c-9d98-59538cc81a17"><ac:plain-text-body><![CDATA[

chain

1.1

 

1.2

[http://felix.markmail.org/message/tgm45au3rpmpmfnf javax.portlet]

]]></ac:plain-text-body></ac:structured-macro>

cli

1.1

  1.2

 

codec

1.3

 

 

1.4

 <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="26ec4762-9def-44e1-bc76-61e01366f7ca"><ac:plain-text-body><![CDATA[

collections

3.2

 

3.2.1

Felix Bundle [http://svn.apache.org/repos/asf/felix/trunk/commons/commons-collections/pom.xml Felix Bundle] doesn't import org.apache.commons.collections.* - asked on [http://felix.markmail.org/message/paqqbwyfcfhxz22f dev@felix]

]]></ac:plain-text-body></ac:structured-macro>

compress

    1.0

     <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d2ae46b0-288c-4284-b986-b3618723a568"><ac:plain-text-body><![CDATA[

    configuration

    1.5

     

    1.6

    Felix Bundle [http://svn.apache.org/repos/asf/felix/trunk/commons/commons-configuration/pom.xml Felix Bundle] uses alot of dynamic import

    ]]></ac:plain-text-body></ac:structured-macro>

    daemon

    1.0.1

     

     

    dbcp

    1.2.2

      1.3

     

    dbutils

    1.1

     

     

    1.2

     <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ff49b643-1dd7-4738-9dcd-d86d0191e23b"><ac:plain-text-body><![CDATA[

    digester

    1.8

     

    1.8.1

    Felix Bundle [http://svn.apache.org/repos/asf/felix/trunk/commons/commons-digester/pom.xml Felix Bundle] does dynamic import of org.apache.commons.logging.impl

    ]]></ac:plain-text-body></ac:structured-macro>

    discovery

    0.4

     

     

    el

    1.0

     

     

    email

    1.1

    1.2

     

     

    exec

      1.0

       <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9f9ce2a6-0222-4cce-bfc0-c9c2ef87adb3"><ac:plain-text-body><![CDATA[

      fileupload

      1.2

      1.2.1 (m2,manual)

      [http://felix.markmail.org/message/tgm45au3rpmpmfnf javax.portlet]]]></ac:plain-text-body></ac:structured-macro>

      io

      1.3.2

      1.4 (m2,manual)

       

      jci

      1.0

       

       

      jelly

      1.0

       

      No m2 build

      jexl

      1.1

       

       

      2.0

       <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="644d923c-8509-44be-89fa-3acf39825aa4"><ac:plain-text-body><![CDATA[

      jxpath

      1.2

       

      See [http://svn.apache.org/repos/asf/felix/trunk/commons/commons-jxpath/pom.xml Felix Bundle]

      ]]></ac:plain-text-body></ac:structured-macro>

      1.3

      See Felix Bundle

      lang

      2.3

      2.4 (m2, commons-parent)

       

      launcher

      1.1

       

       

      logging

      1.1.1

       

      OSGi is N/A; See Below <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0ded62c1-9d3e-4794-a6f3-be1f513f8c34"><ac:plain-text-body><![CDATA[

      math

      1.1

      1.2 (m2,manual)

      See [https://issues.apache.org/jira/browse/MATH-180 MATH-180]

      ]]></ac:plain-text-body></ac:structured-macro>

      modeler

      2.0.1

       

       

      net

      1.4.1

        2.0

       

      pool

      1.3

      1.4 (m1, manual)

       

      primitives

      1.0

       

       

      proxy No yet released

      n/a

      1.0 (m2, bundle plugin)

       

      scxml

      0.7

        0.8

       

      transaction

      1.2

       

       

      <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a532e202-e617-482c-b816-c58d7d4db6e4"><ac:plain-text-body><![CDATA[

      validator

      1.3.1

       

      [http://svn.apache.org/repos/asf/felix/trunk/commons/commons-validator/pom.xml Felix Bundle] has org.apache.oro.*;resolution:=optional ]]></ac:plain-text-body></ac:structured-macro>

      vfs

      1.0

       

       

      Commons Logging

      Wiki MarkupThe things that commons-logging does with classloaders in order to try and work in various servlet engine configurations are not compatible with the classloaders that OSGi environments set up. Therefore adding OSGi attributes to commons-logging is not useful, as commons-logging is not usable in an OSGi environment. See \[http://commons.markmail.org/message/kdnjlbokvuiigcew this thread\] and \[http://wiki.ops4j.org/display/dokuwiki/doku.php?id=pax:logging Pax-logging\]paxlogging/Pax+Logging

      Having said that the Felix project has a bundle to re-package logging - see here Wiki MarkupHaving said that the Felix project has a bundle to re-package logging - see \[http://svn.apache.org/repos/asf/felix/trunk/commons/commons-logging/pom.xml here\]

      Configuring Commons Components for OSGi with Maven1

      ...

      This can be done by specifying appropriate manifest entries for the jar plugin (Pool 1.4 is an \[http://svn.apache.org/repos/asf/commons/proper/pool/tags/POOL_1_4/project.properties example\]) - however it is much easier using maven2 and the {{maven-bundle-plugin}}.

      Configuring Commons Components for OSGi with Maven2

      ...

      The latest version of the \[http://svn.apache.org/repos/asf/commons/proper/commons-parent /trunk/ pom.xml commons-parent pom\] configures the \[http://felix.apache.org/site/maven-bundle-plugin-bnd.html maven-bundle-plugin\]'s _instructions_ using _properties_ in the following way:

      No Format
          <instructions>
              <!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
              <_nouses>true</_nouses>
              <Bundle-SymbolicName>${commons.osgi.symbolicName}</Bundle-SymbolicName>
              <Export-Package>${commons.osgi.export}</Export-Package>
              <Private-Package>${commons.osgi.private}</Private-Package>
              <Import-Package>${commons.osgi.import}</Import-Package>
              <DynamicImport-Package>${commons.osgi.dynamicImport}</DynamicImport-Package>
              <Bundle-DocURL>${project.url}</Bundle-DocURL>
          </instructions>
      

      ...