For a Java application with Maven the following command works
mvn exec:java \
-Dexec.mainClass="com.manuel.jordan.main.Main" \
-Dexec.cleanupDaemonThreads=false
Observation: in the pom.xml file there is no configuration to work with the exec-maven-plugin plugin and as indicated the previous command works fine
In the official documentation:
It "seems" there is nothing about to indicate the javaagent. Just playing I tried
mvn exec:java \
-Dexec.mainClass="com.manuel.jordan.main.Main" \
-Dexec.cleanupDaemonThreads=false \
-Dexec.javaagent:/path/to/maven/repository/org/aspectj/aspectjweaver/1.9.24/aspectjweaver-1.9.24.jar
But it does not work because in the official link does not exist the <javaagent> parameter
Question
- How to execute the
mvn exec:javacommand and indicating ajavaagent?
exec:execgoal.