0

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:java command and indicating a javaagent?
1
  • You are probably going to need the exec:exec goal. Commented Aug 29 at 7:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.