SUMMARY
How can I iteratively run my unit/integration tests in "dev mode" of the liberty-maven-plugin and easily turn on and off the launching of the debugger into the JVM running the tests themselves?
BACKGROUND
While the liberty-maven-plugin by default starts the Open Liberty server in debug mode, sometimes you need to debug into the source of the unit/integration tests themselves. The liberty-maven-plugin dev mode launches the server and will (by default) run my tests each time I hit <Enter>
.
I can leverage standard documented approaches, which by default will launch a forked JVM waiting for a debugger on port 5005, e.g.:
mvn -Dmaven.failsafe.debug liberty:dev
But what if I already started dev mode without that property set on the command line?
Is there an easy way to enable the debugger after the fact? Or to toggle it on/off across executions?