I’m looking for a developmentn model with fast turnaround times when developing a multi-module, maven built, OSGi application.
Actually, the best solution seems to be Pax Construct’s maven plugin (which in turn calls Pax Runner) for provisioning maven generated bundles. However, I didn’t find a way howto deploy to a running OSGi container with help of this (or another) maven plugin. mvn pax:run always starts the OSGi platform afresh. AFAIK it is also not possible to deploy to an already exisiting OSGi container not managed by Pax Runner (e.g. Glassfish v3 or SpringSource dm Server).
Does there exist a maven plugin which allows for quickly deploying a maven module to a running OSGi container, ideally being able to hook into the packaging lifecycle phase ?
How is your development cycle when developing OSGi based applications with maven ?
If you are using glassfish, you can configure maven’s target/ directory to be watched by GlassFish for updates and then GlassFish will automatically install & start the jar when it gets created, it will uninstall it when the jar gets deleted and update the bundle, when the jar gets updated in target directory. To achieve this, create a file called
org.apache.felix.fileinstall-maven.cfg with content like this:
felix.fileinstall.dir=/path/to/target/
felix.fileinstall.poll=5000
felix.fileinstall.bundles.new.start=true
Place this file in domain1/autodeploy/bundles/
For further questions, mail glassfish users alias.
Sahoo