Being able to redeploy your OSGi bundles automatically when you make changes to their source code is very useful when developing Apache Sling applications, for example.
Today I tried the
fizzed-watcher-maven-plugin on a Sling sample bundle, and it seems to work quite well. I just had to add the following to my POM:
And changing any file under src/main causes the bundle to be rebuilt and (via Sling’s default
autoInstallBundle profile) reinstalled in my test Sling instance.
To start the plugin with that setup I used
mvn fizzed-watcher:run -Dsling.url=http://localhost:8080/system/console
See https://github.com/fizzed/maven-plugins for more info.
Filed under: very useful.