Debug test bndrun when using bnd-testing-maven plugin

Hi all,

We rely heavily on maven in our projects, and are using the bnd-maven plugins for OSGi development. This all works great, however now we are looking for a way to debug bndrun files used for testing.

We use the junit-platform tester, and I tried adding the agentlib to the runvm property. And while this adds the correct info when running a mvn verify (at least, so it seems), it fails with an error indicating that the dt_socket library cannot be found.

Is there some other way to debug a bndrun while using maven?

Thanks in advance!

If you are using the bnd-testing-maven-plugin you can do something like:

mvn -D-runjdb=8000 bnd-testing:testing -pl jax-rs.itests/

Let us know if you are using the bnd-testing-maven-plugin or not.

I now see I did not mention it explicitly, but yes, we do use the testing plugin.

I’ve added -D-runjdb to my mvn verify, and now it indeed waits for the debugger to attach! Many thanks for the quick reply!

Knowing what to look for made it also easy to find the documentation (-runjdb ADDRESS | bnd). It seems to be hidden quite well…

@Alexander the bnd team gladly accepts any contributions that help improve the documentation, which is here: bnd/docs at master · bndtools/bnd · GitHub :grinning: :wink: