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

前端 未结 1 947
醉梦人生
醉梦人生 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 :

    <maven-compiler-plugin.version>3.0</maven-compiler-plugin.version>
    

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

    <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
    </plugin>
    

    Hope it helps...

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