You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Apache Wiki <wi...@apache.org> on 2008/01/27 18:10:57 UTC

[Httpcomponents Wiki] Update of "HttpComponentsAndOSGi" by RolandWeber

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki" for change notification.

The following page has been changed by RolandWeber:
http://wiki.apache.org/HttpComponents/HttpComponentsAndOSGi

The comment on the change is:
moved from old wiki

New page:
#pragma section-numbers off

= OSGi-Enabling HttpComponents =

OSGi bundles are JARs with additional metadata that allows for easy deployment of the bundles in OSGi frameworks,
such as Apache Felix or Eclipse Equinox. Since the difference is only the metadata, I (Roland Weber) will look
into generating OSGi bundles instead of plain JARs for the HttpComponents. I'll record my ideas and progress on
this page, hoping to eventually turn that into documentation useful for others.

== Tools ==

The tool of choice for a Maven 2 based project at Apache is the
[http://felix.apache.org/site/maven-bundle-plugin-bnd.html maven-bundle-plugin]
maintained by the Apache Felix team.
That plugin creates complete OSGi bundles, not just the additional metadata.
As such, it would have to replace the currently used maven-jar-plugin for our release builds.
The maven-jar-plugin is specified in the component's parent POM, applicable for all modules in all components.

== Plan ==

Start with !HttpCore-main, as it has no dependencies beyond plain Java.
Put the maven-bundle-plugin into the module POM, and check the output carefully:
 * Are all classes in the bundle?
 * Are all non-classes (properties files) in the bundle?
 * Is the metadata for the bundle correct? (version, symbolic name, package lists)
Compare the effort for the maven-bundle-plugin with the (non-)effort for the maven-jar-plugin.
The bundle plugin calls a separate tool and is therefore not as tightly integrated with Maven 2.

If the approach is feasible, move on to HttpNIO.
Consider moving the maven-bundle-plugin definition to the component POM.
Switch the release assembly from the plain JAR to the OSGi bundle.
[[BR]]
If the approach is not feasible, consider working with the Felix team to improve the plugin integration.


== Status ==

Read through the maven-bundle-plugin documentation.
No hands-on experiments yet.

== Progress ==

not yet started

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org