How can I define Plugin Versions correctly in maven pom.xml?

前端 未结 1 951
醉梦人生
醉梦人生 2021-02-20 10:07

I am struggeling in my attempts to create web-apps, and due to office conventions, I am using a Maven/Jetty/Eclipse setup, while attempting to create java web apps.

In m

1条回答
  •  灰色年华
    2021-02-20 10:15

    You probably use Maven 3 which need to know all plugins versions as describe here : https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes#Maven3.xCompatibilityNotes-AutomaticPluginVersionResolution

    Adding in the pluginManagement section of your parent pom.xml all plugins versions is the right way. The best way (in enterprise) is to have an enterprise parent pom.xml file used by all projects.

    In fact, add the following line in your parent pom.xml properties section :

    3.0
    

    And add the following line in your parent pom.xml build > pluginManagement section :

    
        maven-compiler-plugin
        ${maven-compiler-plugin.version}
    
    

    Hope it helps...

    0 讨论(0)
提交回复
热议问题