Specify javaagent argument with Maven exec plugin

前端 未结 3 706
太阳男子
太阳男子 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:32

    I figured out a way that seems to work well.

    First, setup the maven-dependency-plugin to always run the "properties" goal.

    
        maven-dependency-plugin
        2.5.1
        
            
                getClasspathFilenames
                
                    properties
                
            
         
    
    

    Later on, use the property it sets as documented here with the form:

    groupId:artifactId:type:[classifier]
    

    e.g.

    -javaagent:${mygroup:eclipselink:jar}
    

提交回复
热议问题