Java Reference
In-Depth Information
Project version
Suggested OSGi equivalent
2.1-alpha-1
2.1.0.alpha-1
1.4-m3
1.4.0.m3
1.0_01-ea
1.0.1.ea
1.0-2
1.0.2
1.0.b2
1.0.0.b2
1.0a1
1.0.0.a1
2.1.7c
2.1.7.c
1.12-SNAPSHOT
1.12.0.SNAPSHOT
0.9.0-incubator-SNAPSHOT
0.9.0.incubator-SNAPSHOT
3.3.0-v20070604
3.3.0.v20070604
Table 6.1 Mapping real-world
project versions to OSGi
4aug2000r7-dev
0.0.0.4aug2000r7-dev
Not every version is easily converted to the OSG i format. Look at the last example in
the table; it starts with a number, but this is part of the date rather than the major ver-
sion. This is the problem with free-form version strings—there's no standard way of
comparing them or breaking them into component parts. OSG i versions, on the other
hand, have standardized structure and well-defined ordering. (Later, you'll use a tool
called bnd that makes a good attempt at automated mapping based on common-sense
rules, but even bnd has its limits.)
After you've uniquely identified your bundle by name and version, you can
add more information: a human-friendly Bundle-Name , a more detailed Bundle-
Description , license details, vendor details, a link to online documentation, and so
on. Most if not all of these details can be taken from existing project information,
such as the following example from the second release of Google Guice ( http://
code.google.com/p/google-guice/ ) :
Bundle-SymbolicName: com.google.inject
Bundle-Version: 2.0
Bundle-Name: guice
Bundle-Copyright: Copyright (C) 2006 Google Inc.
Bundle-Vendor: Google Inc.
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-DocURL: http://code.google.com/p/google-guice/
Bundle-Description: Guice is a lightweight dependency injection
framework for Java 5 and above
Remember that new OSG i bundles should also have this header:
Bundle-ManifestVersion: 2
This tells the OSG i framework to process your bundle according to the latest specifica-
tion. Although this isn't mandatory, it's strongly recommended because it enables
 
Search WWH ::




Custom Search