Matthias
Matthias

Reputation: 3556

Maven PluginManagement in modules

I stumbled over a maven project with one parent P, that has modules A and B. In this project the modules A and B include a PluginManagement section? Now i wonder: Does this make sense? What could be the intent of this?

matthias.

Upvotes: 1

Views: 100

Answers (1)

Simon Hellinger
Simon Hellinger

Reputation: 1339

The PluginManagement sections are placed so that child-elements may all use the same plugins and versions. The children still have to reference the plugins but may omit the plugin version for instance.

I don't think using PluginManagement in modules A and B makes much sense unless its creator planned to extend this and then decided otherwise. It should be replaced by

<plugins>
    <!-- your modules -->
<plugins>

Upvotes: 1

Related Questions