Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Exporting packages without a version

Hi equinox-dev team,

I have a question regarding exporting an unversioned package.
If I look over the bundles in eclipse, the most of them (expect of some orbit bundles) exports packages without a version.
We do it likewise e.g.:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Xbase Runtime Library
Bundle-SymbolicName: org.eclipse.xtext.xbase.lib
Bundle-Version: 2.8.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.xtend2.lib,
 org.eclipse.xtext.xbase.lib,
 org.eclipse.xtext.xbase.lib.internal;x-internal:=true,
 org.eclipse.xtext.xbase.lib.util

In an osqi container I see that this packages are exported with 0.0.0 it doesn’t care what the bundle-version is:
osgi>  b 584
org.eclipse.xtext.xbase.lib_2.7.3.v201411190455 [584]
  Id=584, Status=RESOLVED    Data Root=/Users/dhuebner/Entwicklung/xtext-new/eclipse/configuration/org.eclipse.osgi/584/data
  "No registered services."
  No services in use.
  Exported packages
    org.eclipse.xtend2.lib; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib.internal; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib.util; version="0.0.0"[exported]
  Imported packages
    com.google.common.annotations; version="15.0.0" <com.google.guava_15.0.0.v201403281430 [4]>
    co

osgi>  b 626
org.eclipse.xtext.xbase.lib_2.8.0.v201411111037 [626]
  Id=626, Status=RESOLVED    Data Root=/Users/dhuebner/Entwicklung/xtext-new/eclipse/configuration/org.eclipse.osgi/626/data
  "No registered services."
  No services in use.
  Exported packages
    org.eclipse.xtend2.lib; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib.internal; version="0.0.0"[exported]
    org.eclipse.xtext.xbase.lib.util; version="0.0.0"[exported]
  Imported packages
    com.google.common.annotations; version="15.0.0" <com.google.guava_15.0.0.v201403281430 [4]>
    com.goo

I thought, that if my bundle exports a package without a version, it means, that the version is the same as a Bundle-Version. But from what I see in the osgi console it seems that I’m wrong.

osgi> b org.eclipse.xtend.lib
org.eclipse.xtend.lib_2.8.0.v201411111037 [544]
  Id=544, Status=RESOLVED    Data Root=/Users/dhuebner/Entwicklung/xtext-new/eclipse/configuration/org.eclipse.osgi/544/data
  "No registered services."
  No services in use.
  Exported packages
    org.eclipse.xtend.lib; version="0.0.0"[exported]
    org.eclipse.xtend.lib.annotations; version="0.0.0"[exported]
  Imported packages
    com.google.common.annotations; version="15.0.0" <com.google.guava_15.0.0.v201403281430 [4]>
...
    org.eclipse.xtext.xbase.lib; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.8.0.v201411111037 [626]>
    org.eclipse.xtext.xbase.lib; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.7.3.v201411190455 [584]>
    org.eclipse.xtext.xbase.lib.internal; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.8.0.v201411111037 [626]>
    org.eclipse.xtext.xbase.lib.internal; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.7.3.v201411190455 [584]>
    org.eclipse.xtext.xbase.lib.util; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.8.0.v201411111037 [626]>
    org.eclipse.xtext.xbase.lib.util; version="0.0.0" <org.eclipse.xtext.xbase.lib_2.7.3.v201411190455 [584]>
  No fragment bundles
  Required bundles
    osgi.identity; osgi.identity="org.eclipse.xtext.xbase.lib"; type="osgi.bundle"; version:Version="2.8.0.v201411111037"
    osgi.identity; osgi.identity="org.eclipse.xtend.lib.macro"; type="osgi.bundle"; version:Version="2.8.0.v201411111037"

My question is, which package will be wired if an another bundle require (using Require-Bundle) an xbase.lib bundle with version constraint 2.8.0?


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top