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 com.oracle.roo.JDBC --groupId com.oracle --artifactId ojdbc14 --version 10.2.0.2 --vendorName Oracle --licenseUrl http://www.oracle.com

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/com.oracle.roo.jdbc.<...>.jar

or


> osgi start--url file:///C:/<project dir>/target/com.oracle.roo.jdbc.<...>.jar

Here are the resources found online
http://forum.springsource.org/showthread.php?t=100985


http://forum.springsource.org/showthread.php?t=96301


http://forum.springsource.org/showthread.php?t=96033&highlight=Oracle+dbre


http://static.springsource.org/spring-roo/reference/html/base-dbre.html#dbre_installation


http://saber.b2b2000.com/display/BLUE/2011/01/26/Roo+reverse+engineering+on+Oracle

No comments:

Post a Comment