You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Van Geertruy, Michael" <mv...@NCIINC.com> on 2010/08/23 22:07:00 UTC

Heuristic for exporting proper version numbers in Export Package

In a previous e-mail, I talked about what happens when you put an * in the <Export-Package> directive of the maven-bundle plugin.  It packages all dependendencies into your bundle and exports them all.  The problem is, this does not export the proper version numbers of the packages being bundled into your primary bundle.  In fact, when you deploy a bundle created this way into Karaf, and then execute a packages:exports from the command-line, it will show all of the exports, but each one will have the version set to "0.0.0" instead of thier actual version.
 
Is there a way use the * with an osgi heuristic to export the proper version numbers of the packages contained?
 
The package I'm deploying is mainly a set of libraries and proprietary packages using those libraries, as such the number of bundles I deploy when doing with the OSGi way using a features.xml file is 124.  Packaging them all together in this "library" bundle is good, but only if the version numbers of the dependent packages are properly exported also.  Short of doing a features.xml file, how can I tell the maven-bundle-plugin to use the version numbers of the individual packages?
 
I also tried <Export-Package>*;version=${pom.version}</Export-Package>  Which may work well for the pom-specific libraries, but this sets the version numbers of all exported packages to whatever the pom version is.  
 
Any help?
 
Mike Van, PMP, CSM, WTF?
 
################################################################################
If you have received this message in error, please contact the sender
immediately and be aware that the use, copying, or dissemination of 
this information is prohibited. This email transmission contains 
information from NCI Information Systems, Inc. that may be considered 
privileged or confidential and is intended solely for the named 
recipient.
################################################################################

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Heuristic for exporting proper version numbers in Export Package

Posted by Justin Edelson <ju...@gmail.com>.
On 8/23/10 4:07 PM, Van Geertruy, Michael wrote:
> Packaging them all together in this "library" bundle is good

It's not good. It's bad.

If someone's providing you with an OSGi bundle, you shouldn't be
repackaging this into your own OSGi bundle.

IMHO, the behavior of * you're describing is incorrect; it should only
export all packages contained in your source tree.

Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org