How to add the vm option to the pier?

How can I specify the vm option, for example, -javaagent , to start jetty or is it available only through the variable MAVEN_OPTS? I need this in order to allow loading in time aspects. This plugin does not seem to work.

<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>maven</executable> <arguments> <argument>-javaagent:path\to\org\aspectj\aspectjweaver\1.6.10\aspectjweaver-1.6.10.jar</argument> </arguments> </configuration> </plugin> 

Perhaps this can be done with a bridgehead, but its systemProperties tag said that

will not override system properties that were installed on the command line or JVM

What does it mean?

+4
source share
1 answer

you can try adding something like this -javaagent:% PATH_TO_AGENT% \ spring -agent-2.5.6.jar to JAVA_OPTS

0
source

Source: https://habr.com/ru/post/1340951/


All Articles