'maven how to automaticaly apply plugin from another artifact to project

I have to setup many maven projects having almost the same structure, same dependencies and same plugins.

So i decided to create a bom containing all my common dependencies. So my all other projects include this bom (by inheritance or import).

I want to do the same thing with maven plugins. So I declare my plugins in <plugins> bloc in my bom project. Is there a better way to do that ?

What is the recommended way to externalize maven plugin configuration ?



Solution 1:[1]

Create a parent POM with the plugin configuration and inherit it in your projects.

Importing BOMs does not work for your use case.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 J Fabian Meier