Plugins in Maven and POM.xml

前端 未结 7 1184
无人及你
无人及你 2021-01-30 20:27

I just started using Maven and I read that plugins are additional components that can be used.
A typical structure of pom.xml file is



        
7条回答
  •  猫巷女王i
    2021-01-30 20:44

    As additional answer for Reporting Plugins (e.g. maven-checkstyle-plugin) there are 2 tags under which plugins can go in pom.xml, under build and reporting.

    Using the reporting Tag VS build Tag

    Configuring a reporting plugin in the or elements in the pom does NOT have the same behavior!

    mvn site

    It uses only the parameters defined in the element of each reporting Plugin specified in the element, i.e. site always ignores the parameters defined in the element of each plugin specified in .

    mvn aplugin:areportgoal

    It uses firstly the parameters defined in the element of each reporting Plugin specified in the element; if a parameter is not found, it will look up to a parameter defined in the element of each plugin specified in .

    Source: https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_reporting_Tag_VS_build_Tag

提交回复
热议问题