THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Provide the list of steps required to create a library bundle by wrapping the library jar using bnd (http://www.aqute.biz/Code/Bnd).
Steps
- Use bnd to analyze the library jar (e.g., java -jar bnd-0.0.jar print path/to/FOO.jar)
- At the bottom of the bnd output, look for "Unresolved references to ..." which identify package dependencies. If found,
a. Identifiy the library jars that provide the missing packages
b. Recursively use this process on each dependency - Create a directory that will be the project directory for the bundle (e.g., mkdir FOO-osgi)
- Copy the template pom.xml file to the bundle's project directory
- Edit the pom.xml file to tailor it for the library jar. Specifically,
a. change artifactId
b. verify description
c. change version
d. change FOO's library jar dependency (groupId, artifactId)
e. add any other dependencies (from step 2b)
f. change Export-Package
g. change Private-Package or delete it if it's not needed
h. All packages listed in step 1 should be in either Export-Package or Private-Package. Use the library's javadoc to identify the exported packages. The remaining packages should be private. - Run "mvn package" to in the project directory to create the bundle
- Use bnd to verify the bundle's contents (e.g., java -jar bnd-0.0.jar print target/FOO-osgi-VERSION.jar)
- Run "mvn install" to install the bundle in the local repository
...
Resources
Bnd - Bundle Tool http://www.aqute.biz/Code/Bnd
Bundle Plugin for Maven http://felix.apache.org/site/maven-bundle-plugin-bnd.html