Pr0methean
Pr0methean

Reputation: 315

Maven: Use <pluginManagement> as <plugins>

Instead of having to redundantly specify all plugins and their versions twice, is there a way to specify in a pom.xml that the <plugins> tag should consist of all the plugins listed in <pluginManagement>, when I don't fall into any of the legitimate use cases for divergence between the two?

Upvotes: 0

Views: 1099

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35805

A common approach is to define all plugins in a parent pom and inherit them. Then you can alter the plugin versions and configurations you need to change, and keep all the "normal" stuff.

PluginManagement can only be used for setting versions and configurations, not for actually activating the plugins.

Upvotes: 1

Related Questions