-
1. Re: How to install a non-OSGi maven jar as an OSGi bundle in FUSE?
joe.luo May 29, 2009 12:38 PM (in response to oren)There are several ways to transform/convert a non-OSGI jar into a OSGI bundle.
1. you could use command line tool "bnd", for more information about creating an OSGI bundle from a plain jar, please have a look at their web site http://www.aqute.biz/Code/Bnd.
2. You could use pax-url-wrap and it is already available from the Fuse ESB 4.1. So basically, you could do something like:
osgi install -s wrap:mvn:com.mycompany/myProject/1.0-SNAPSHOT
Note, you could used *file" instead of mvn so it allows you to install a jar from your local file system. for instance:
osgi install -s wrap:file:///C:/temp/myProject.jar
For more information about pax-url-wrap, please have a look at http://wiki.ops4j.org/display/paxurl/Wrap+Protocol. Basically it uses the "bnd" tool mentioned above.
3. you could use maven-bundle-plugin just as in your project to build an OSGI bundle.
However, the bottom line is that you will have to have all dependent packages available as bundles in the container already if you want to start your bundle. It is different from maven where the maven will pull out all the dependencies for you automatically.
As for the log, you could change the log level using log set to minimize the level of logs that printed out.
Hope it helps,
/Joe
-
2. Re: How to install a non-OSGi maven jar as an OSGi bundle in FUSE?
oren Jun 18, 2009 9:59 PM (in response to joe.luo)Joe, thank you so much, this helped and solved my problem!!
Oren
-
3. Re: How to install a non-OSGi maven jar as an OSGi bundle in FUSE?
oren Jun 20, 2009 7:28 PM (in response to oren)Joe's answer was excellent!