Issue Details (XML | Word | Printable)

Key: NUCACCESS-92
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andy Jefferson
Reporter: Matthew T. Adams
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus AccessPlatform

Add version to Export-Package OSGi headers in DataNucleus bundles

Created: 20/Sep/11 03:43 PM   Updated: 11/Jan/12 05:32 PM   Resolved: 05/Oct/11 12:28 PM
Component/s: None
Affects Version/s: 3.0.1, 3.0.2
Fix Version/s: 3.0.3

File Attachments: 1. Text File NUCACCESS-92.patch (0.5 kB)



 Description  « Hide
The OSGi Export-Package header defaults versions of exported packages to 0.0.0 if no version qualifier is given for an exported package. Several, if not all, DataNucleus bundles do not include package versions in their Export-Package headers.

Please add version information to exported packages.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 20/Sep/11 03:56 PM
Perhaps follow http://www.datanucleus.org/servlet/jira/browse/NUCACCESS-61 and provide patches since you're somebody using OSGi (as was the author of that issue, but he also provided no input there).

Matthew T. Adams added a comment - 20/Sep/11 04:52 PM
Ok. Will do. I just noticed I'm getting a NCDFE for org.osgi.framework.FrameworkUtil because datanucleus-core-3.0.2-SNAPSHOT.jar does not include org.osgi.framework as an imported package. I'll note all of the fixes I have to make for my use cases & patch.

Andy Jefferson added a comment - 05/Oct/11 12:28 PM
SVN trunk now applies the main parts of your patches, adding version to export packages, and adding on some optional imports. Thx.

I've not included
* the eclipse import-package lines since they fail when I try to build "core" in Eclipse (left the import bundles)
* bonecp, and dbcp version ranges. The BoneCP one fails when building under Eclipse, and the SBCP one is wrong - as mentioned before BND is crap at version ranges.

Obviously OSGi is really the cause of this problem ... you denote a bundle as version 3.0.1, and export various packages from it ... so common sense says that all exported packages are version 3.0.1 (i.e the bundle), not 0.0.0. Simply illogical, and they (OSGi people) wonder why people complain about its "requirements" ...

Matthew T. Adams added a comment - 05/Oct/11 11:17 PM
Oops, forgot to import javax.sql in the RDBMS bundle. Not quite sure how we missed that one... :) Patch attached.