[JAVA-171] Add 'export-package' declaration in Java driver jar so that mongodb classes are usable in an OSGi context. Created: 04/Oct/10  Updated: 29/Oct/10  Resolved: 05/Oct/10

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.2

Type: New Feature Priority: Minor - P4
Reporter: Ken Gilmer Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Attachments: File MANIFEST.MF     XML File build.xml    

 Description   

The META-INF/MANIFEST currently in the Java JAR does not export any packages. It would be nice to be able to use the driver as a bundle in an OSGi runtime. The additional line in MANIFEST.MF would be something like...

export-package: com.mongodb, com.mongodb.io, com.mongodb.util



 Comments   
Comment by auto [ 05/Oct/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: Add 'export-package' declaration in Java driver jar so that mongodb classes are usable in an OSGi context JAVA-171
http://github.com/mongodb/mongo-java-driver/commit/9678ff590d0cbc937d71d05415d2a5b2806a389f

Comment by Eliot Horowitz (Inactive) [ 05/Oct/10 ]

Thanks for the patch!

Comment by Ken Gilmer [ 04/Oct/10 ]

Well heck I needed to do it anyway so here it is. I got the sources from a tarbal rather than scr checkout so wasn't easy to just provide a patch. I modified the root build file and created the static manifest at src/main/META-INF/MANIFEST.MF. I'm new to mongodb and so I just exported all the packages but that's probably not necessary.

hth
ken

Comment by Ken Gilmer [ 04/Oct/10 ]

Well it looks like it's building with ant, so you could just manually specify a predefined MANIFEST.MF in the Jar ant task. LMK if you'd like me to submit a patch for this.

Generated at Thu Feb 08 08:51:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.