What is pluginManagement in Maven's pom.xml?

前端 未结 5 1098
野性不改
野性不改 2020-11-22 06:41

This is a snippet of my pom file.

....
        
            
                

        
5条回答
  •  心在旅途
    2020-11-22 07:07

    You use pluginManagement in a parent pom to configure it in case any child pom wants to use it, but not every child plugin wants to use it. An example can be that your super pom defines some options for the maven Javadoc plugin.

    Not each child pom might want to use Javadoc, so you define those defaults in a pluginManagement section. The child pom that wants to use the Javadoc plugin, just defines a plugin section and will inherit the configuration from the pluginManagement definition in the parent pom.

提交回复
热议问题