I have a pure Maven project with one OSGi bundle. The project has a bnd.bnd
and a app.bndrun
file.
The JAR is created incrementally including the corresponding OSGi headers.
I want to install and start this bundle with the Bnd Native Launcher in karaf. The app.bndrun
looks like this:
-runpath: biz.aQute.remote.launcher
-runremote: debug;\
shell = -1; \
jdb = 5005; \
host = localhost; \
agent = 29998; \
timeout = 30000
-runee: JavaSE-1.8
-runproperties: gosh.args=--noshutdown
-runtrace: true
-runbundles: \
karaf-test
When I start the launcher, the bundle is installed and started in karaf.
Whenever I change the Java code, the JAR is automatically regenerated. Unfortunately, the bundle will not restart.
I suspect the problem is because the BuildListeners are not being notified. The BndtooldBuilder does this, but this builder is not active in an enroute workspace (maven).
Is there a solution how to aotomatically restart the bundle with the Bnd Native Launcher?
If desired, I can publish an exmaple workspace on github.