Wednesday, February 16, 2011

wrap jar file for osgi by spring roo

Spring roo provide a way to wrap a normal jar file to osgi jar file

for example

roo> addon create wrapper --topLevelPackage --groupId --artifactId ojdbc14 --version --vendorName Oracle --licenseUrl

By the parameter groupId, artifactId and version, roo can find the jar file in the maven repository.

quit roo, run

mvn bundle:bundle

it will generate the osgi jar file in the target dir.

if you want to install that module in roo, run this command

> osgi install --url file:///C:/<project dir>/target/<...>.jar


> osgi start--url file:///C:/<project dir>/target/<...>.jar

Here are the resources found online

No comments:

Post a Comment