Showing posts with label PAX. Show all posts
Showing posts with label PAX. Show all posts

Monday, March 30, 2009

Trick to customize war deployment on ServiceMix4 using PAX

Here is another very interesting trick that you can use to customize the war the deployment process on ServiceMix.

customize = in this context, this word means How can I add property or extend existing of a MANIFEST file

e.g. : The WAR to be deployed contains tlb files created under the folder WEB-INF/tags/form and WEB-INF/tags/jms. By default PAX will create a MANIFEST file containing the property Bundle-Classpath with :
  • WEB-INF/classes
  • all jars from WEB-INF/lib directory
but will not take care about your folders

Two possibilities are available to tell to PAX that it must include in the Bundle-Classpath your folders

1) Command + uri

This one consists in to pass the parameters as an uri like this :

install war:file:///d:/temp/activemq-web-console-5.2.0.war?Bundle-Classpath= ., WEB-INF/tags/form, WEB-INF/tags/jms&Webapp-Context= activemqweb

2) Create a file.bnd + command

Another interesting option is to provide as a file the location of the WAR and the properties that you want to add
  • Create a file called xxxx.bnd
  • Add in the file the following lines :
WAR-URL=file:///c/temp/activemq-web-console-5.2.0.war
Bundle-Classpath=., WEB-INF/tags/form, WEB-INF/tags/jms
Webapp-Context=activemqweb
  • use in your favorite OSGI server (ServiceMix) the following command to install the WAR :
install war-i:file:///c:/temp/activemq-web-console-5.2.0.bnd

Friday, January 9, 2009

How to create OSGI bundles using PAX scripts

This following article(s) started to explore how PAX (see here for more information on PAX : http://wiki.ops4j.org/display/ops4j/Pax) scripts can be used with (or without) Spring DM
and help developer life to
  • create/modify OSGI bundles
  • deploy them in Equinox/Felix/...

How to create a Spring-DM bundle using PAX scripts - JQuantLib

http://aslamkhan.net/software-development/osgi-cookbook-1-a-simple-bean/