[ https://issues.apache.org/jira/browse/FELIX-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623008#action_12623008 ]
Marcel Offermans commented on FELIX-682: ---------------------------------------- I'm saying that based on the text I quoted from the Java tutorial that explains how you can specify an implementation version per package. You now quote a different spec that exists for extensions. Both of us are making assumptions here: - I am assuming that a bundle somehow inherits from a jar spec wise (that manifest headers that are defined for normal Java jars are somehow also valid for bundles) - you are assuming that a bundle somehow inherits from an extension (again manifest wise) Neither is probably true. Whilst I don't mind discussing if it makes sense to somehow provide package specification and implementation versions for the Package class, I would first like to see how those should be mapped, because right now I see many differences between the package and extension versioning spec and the OSGi spec. To be honest, I don't see why you don't just repackage your classes into an extension jar if you want to use your code that way. Well, I know one reason, maven does not exactly make that easy for you, but that's a completely different discussion. I would say, let's first discuss a way to specify those versions, then propose an RFE to OSGi. If we implement this now in Felix, all it will do is create an implementation where people start relying on non-standard behavior with the end result that their bundles won't work the same way on other platforms anymore. > Package.getImplementationVersion returns null for package loaded by Felix > ------------------------------------------------------------------------- > > Key: FELIX-682 > URL: https://issues.apache.org/jira/browse/FELIX-682 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: felix-1.0.4 > Environment: NA > Reporter: Sahoo > Fix For: felix-1.2.0 > > Attachments: Felix-682.zip > > > Even though MANIFEST.MF has proper entry for Implementation-Version, > Package.getImplementationVersion() returns null. A reproducible test case is > attached. It is described below: > public class Foo implements BundleActivator { > public void start(BundleContext context) throws Exception { > Package p = getClass().getPackage(); > System.out.println(p); > System.out.println(p.getImplementationVersion()); > } > } > The headers for this bundle are: > osgi-test1 (10) > --------------- > Tool = Bnd-0.0.255 > Bundle-Activator = sahoo.osgitest1.Foo > Implementation-Version = 1.0-SNAPSHOT > Implementation-Vendor-Id = sahoo > Bundle-Version = 1.0.0.SNAPSHOT > Build-Jdk = 1.5.0_13-rev > Implementation-Title = osgi-test1 > Created-By = Apache Maven Bundle Plugin > Bundle-ManifestVersion = 2 > Manifest-Version = 1.0 > Bnd-LastModified = 1218821794953 > Private-Package = sahoo.osgitest1 > Bundle-Name = osgi-test1 > Built-By = ss141213 > Import-Package = org.osgi.framework;version="1.3" > Bundle-SymbolicName = sahoo.osgi-test1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.