0

I am running my project from eclipse and I simply add a JVM argument like this:

-javaagent:path to my ho hw ho folder/openjpa-2.3.0.jar

now i am running my code from the server ,and I do have the pom there, i would like to ask you if it is possible to add that javaagent from the pom

What i have tried

: i added a <jvmSettings> in the pom, so basically i did this:
    <jvmSettings>
    <systemProperties>
 <systemProperty>javaagent=path to my ho hw ho folder/openjpa-2.3.0.jar</systemProperty>
    </systemProperties>
    </jvmSettings>

my question is: is that correct? do i need to add the - before javaagent?

Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
  • have you tried the solution here? http://stackoverflow.com/questions/14777909/specify-javaagent-argument-with-maven-exec-plugin – chrisl08 Sep 04 '15 at 14:06

1 Answers1

-2

You could use environment variable to pass in Java argument -javaagent as shown here

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438