Difference between <plugins> and <pluginManagement> tag in Maven `pom.xml`

JavaMavenpom.xml

Java Problem Overview


While configuring my pom.xml, I had to configure a plugin. What I found out is that the <plugin> tag may be inserted inside either <plugins> or <pluginManagement> elements. I am confused!

What is the difference between <plugins> and <pluginManagement>?

Java Solutions


Solution 1 - Java

From Maven documentation:

> pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions.

You can look at a better answer

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCALTyangView Question on Stackoverflow
Solution 1 - JavaSergii GetmanView Answer on Stackoverflow