I am working on a Java agent that instruments test suites and the code
under test. The agent runs by invoking the following command on the command
line:

mvn test -DargLine="-javaagent:C:\JARS\agent.jar"

The apache surefire plugin takes care of running the tests and pushing the
-DargLine argument to the test JVM.

But for hierarchical projects, I believe multiple JVMs are instantiated,
one for each child package configured with pom.xml, as *mvn test *is
recusively invoked downstream. I would like to keep track of each such
child by capturing in mid-flight the group id, artifact id and version if
it's available and passing this information into the agent.

Is there a way to accomplish this data capture? Assume JUnit test suites.

Reply via email to