Eddie
Eddie

Reputation: 73

Sharing plugin versions between reactor and parent pom in a multi-module maven project

I have a multi-module maven project with a reactor pom that I use to build the whole project, and a parent pom which all child modules inherit from.

There is a plugin I need to have in both the reactor and the parent poms, meaning I have a separate use for the plugin in the child modules and in the reactor pom used to aggregate the build. I'd like to manage the version of this plugin in one file, instead of manually changing it in both files every time.

Example:

Project structure:
--pom.xml //reactor pom - aggregates the build (contains the plugin)
----parent/pom.xml //parent pom - all child modules inherit this pom (contains the plugin)
----a/pom.xml //module a - inherits parent/pom.xml
----b/pom.xml //module b - inherits parent/pom.xml
----c/pom.xml //module c - inherits parent/pom.xml

Note: the parent pom is inherited by child modules only. Not by the reactor.

any help is greatly appreciated, thanks in advance

Upvotes: 1

Views: 326

Answers (0)

Related Questions