Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D2F3FDD1 for ; Wed, 27 Mar 2013 18:57:16 +0000 (UTC) Received: (qmail 16080 invoked by uid 500); 27 Mar 2013 18:57:16 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 16058 invoked by uid 500); 27 Mar 2013 18:57:16 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 16050 invoked by uid 99); 27 Mar 2013 18:57:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Mar 2013 18:57:16 +0000 Date: Wed, 27 Mar 2013 18:57:16 +0000 (UTC) From: =?utf-8?Q?Christian_M=C3=BCller_=28JIRA=29?= To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6069) Derby doesn't export the version number in its OSGI exported packages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6069?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1361= 5631#comment-13615631 ]=20 Christian M=C3=BCller commented on DERBY-6069: ----------------------------------------- It's a bit complicated... :-) In OSGI you can define dependencies to bundles or packages. You can define = (coarse grained) dependencies to bundles like: Require-Bundle: derby;bundle-version=3D"10.8.3000000.1405108" which will probably work. However, the recommended way is to define (fine g= rain) dependencies to packages your bundle depend on: Import-Package: org.apache.derby.jdbc;version=3D10.8.3 At present, derby use the following Export-Package syntax: Export-Package: org.apache.derby.jdbc which is in OSGI the same as Export-Package: org.apache.derby.jdbc;version=3D"0.0.0" and this will not resolve the Spring JDBC's (and others) Import-Package dec= laration (which is by the way "translated" into "version 10.8.3 and all lat= er"). I don't have a good use case in mind where it make sense to have different = version numbers for you package exports and for your bundle. However, the s= pec allows this and because of this, you have to explicitly define the vers= ion numbers for your package exports. This can not be derive from the bundl= e version. These links could be useful: http://wiki.osgi.org/wiki/Bundle-Version http://wiki.osgi.org/wiki/Require-Bundle http://wiki.osgi.org/wiki/Export-Package http://wiki.osgi.org/wiki/Import-Package Best, Christian =20 > Derby doesn't export the version number in its OSGI exported packages > --------------------------------------------------------------------- > > Key: DERBY-6069 > URL: https://issues.apache.org/jira/browse/DERBY-6069 > Project: Derby > Issue Type: Bug > Affects Versions: 10.9.1.0, 10.8.3.0 > Reporter: Christian M=C3=BCller > Labels: osgi > Attachments: MANIFEST.MF > > > Derby doesn't export the version number in its OSGI exported packages. Se= e the following exports: > {noformat} > karaf@root> headers 259 > Apache Derby 10.8 (259) > ----------------------- > Manifest-Version =3D 1.0 > Ant-Version =3D Apache Ant 1.7.0 > Class-Path =3D derbyLocale_cs.jar derbyLocale_de_DE.jar derbyLocale_es.ja= r derbyLocale_fr.jar derbyLocale_hu.jar derbyLocale_it.jar derbyLocal > e_ja_JP.jar derbyLocale_ko_KR.jar derbyLocale_pl.jar derbyLocale_pt_BR.ja= r derbyLocale_ru.jar derbyLocale_zh_CN.jar derbyLocale_zh_TW.jar > Sealed =3D true > Created-By =3D 2.4 (IBM Corporation) > Bundle-Vendor =3D Apache Software Foundation > Bundle-Activator =3D org.apache.derby.osgi.EmbeddedActivator > Bundle-Name =3D Apache Derby 10.8 > Bundle-SymbolicName =3D derby > Bundle-Version =3D 10.8.3000000.1405108 > Bundle-ManifestVersion =3D 2 > DynamicImport-Package =3D > * > Export-Package =3D > org.apache.derby.authentication, > org.apache.derby.database, > org.apache.derby.io, > org.apache.derby.jdbc, > org.apache.derby.vti > {noformat} > {noformat} > karaf@root> headers 250 > Apache Derby 10.9 (250) > ----------------------- > Manifest-Version =3D 1.0 > Ant-Version =3D Apache Ant 1.7.1 > Class-Path =3D derbyLocale_cs.jar derbyLocale_de_DE.jar derbyLocale_es.ja= r derbyLocale_fr.jar derbyLocale_hu.jar derbyLocale_it.jar derbyLocal > e_ja_JP.jar derbyLocale_ko_KR.jar derbyLocale_pl.jar derbyLocale_pt_BR.ja= r derbyLocale_ru.jar derbyLocale_zh_CN.jar derbyLocale_zh_TW.jar > Sealed =3D true > Created-By =3D 20.6-b01-415 (Apple Inc.) > Bundle-Vendor =3D Apache Software Foundation > Bundle-Activator =3D org.apache.derby.osgi.EmbeddedActivator > Bundle-Name =3D Apache Derby 10.9 > Bundle-SymbolicName =3D derby > Bundle-Version =3D 10.9.1000000.1344872 > Bundle-ManifestVersion =3D 2 > DynamicImport-Package =3D > * > Export-Package =3D > org.apache.derby.authentication, > org.apache.derby.database, > org.apache.derby.io, > org.apache.derby.jdbc, > org.apache.derby.vti > {noformat} > This leads to problems, if other bundles imports derby packages with a sp= ecific version or version range (like spring-jdbc do): > {noformat} > karaf@root> headers 251 > Spring JDBC (251) > ----------------- > Manifest-Version =3D 1.0 > ... > Import-Package =3D > ... > org.apache.derby.impl.io;resolution:=3Doptional;version=3D"[10.5.= 0, 11.0.0)", > org.apache.derby.jdbc;resolution:=3Doptional;version=3D"[10.5.0, = 11.0.0)", > ... > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira