Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 53180 invoked from network); 15 Aug 2008 19:40:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2008 19:40:35 -0000 Received: (qmail 83589 invoked by uid 500); 15 Aug 2008 19:40:33 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 83547 invoked by uid 500); 15 Aug 2008 19:40:33 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 83536 invoked by uid 99); 15 Aug 2008 19:40:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 12:40:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 19:39:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4D6B7234C1AE for ; Fri, 15 Aug 2008 12:39:44 -0700 (PDT) Message-ID: <1781781610.1218829184302.JavaMail.jira@brutus> Date: Fri, 15 Aug 2008 12:39:44 -0700 (PDT) From: "Marcel Offermans (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-682) Package.getImplementationVersion returns null for package loaded by Felix In-Reply-To: <504358405.1218823064149.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622994#action_12622994 ] Marcel Offermans commented on FELIX-682: ---------------------------------------- Where does it say that implementation version is JAR wide? The only thing I can find is this: http://java.sun.com/docs/books/tutorial/deployment/jar/packageman.html And if I then look at the manifest you quote here, it is not compliant with that spec. But besides that, we have a perfectly working versioning mechanism in OSGi which is much better than what Java offers, so why bother with that Package class at all? > 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.