Specify javaagent argument with Maven exec plugin

前端 未结 3 704
太阳男子
太阳男子 2020-12-14 21:00

I have a similar question to: this previous question

I am converting a Java project using Netbeans to Maven. In order to launch the program, one of the command-line

3条回答
  •  生来不讨喜
    2020-12-14 21:17

    Simply define a property for the eclipse link version and use the property in your and the exec plugin:

        
            2.4.0
        
        
            org.eclipse.persistence
            eclipselink
            ${eclipselink.version}
        
        ...
        
          org.codehaus.mojo
          exec-maven-plugin
          
          java
           
               -Xmx1000m
               -javaagent:lib/eclipselink-${eclipselink.version}.jar
               -classpath
               
               my.App
           
         
       
    

提交回复
热议问题