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/09/01 21:29:57 UTC

[Httpcomponents Wiki] Update of "HttpComponentsAndOSGi" by OlegKalnichevski

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 OlegKalnichevski:
http://wiki.apache.org/HttpComponents/HttpComponentsAndOSGi

------------------------------------------------------------------------------
- #pragma section-numbers off
+ See [https://issues.apache.org/jira/browse/HTTPCORE-125]
  
- = 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, we should be looking into generating OSGi bundles
- instead of plain JARs for the HttpComponents. This page is meant for recording ideas
- and progress
- 
- == 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.
- 
- Alternatively, it is possible to manually define the metadata in pom.xml instead of generating it.
- See [:OSGiMetaData] for an example.
- (One advantage of this approach is that the manifest is then much easier to read).
- 
- == Plan ==
- 
- Start with !HttpCore-main, as it has no dependencies beyond plain Java.
- Put the maven-bundle-plugin into the module POM.
- The Commons folks have figured out a second way to use the bundle plugin.
- Instead of changing the bundling from jar to bundle and letting the bundle plugin
- assemble the jar file, it is possible to only create the MANIFEST with the
- OSGi specific metadata but continue to use the regular jar plugin for bundling.
- [[BR]]
- Try both options 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,
- or add the generated MANIFEST by default to the jar plugin.
- [[BR]]
- If the approach is not feasible, consider working with the Felix team
- to improve the plugin integration.
- 
- 
- == Status ==
- 
- not yet started
- 

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