In my projects want to use some common Maven plugin configurations like spotless and enforcer to ensure some consistency across all projects. So, I put these plugins into a parent pom that I inherit from. Now, some of the projects are Spring Boot applications that already have spring-boot-starter-parent as parent.
Is there any way to apply these convention plugins on all projects, but still allow some to use spring-boot-starter-parent? I have come across https://github.com/repaint-io/maven-tiles which does seem to solve that problem. However, tiles do seem to work against the Maven model, it does add additional complexity. I'm hoping for a more natural solution to the problem.
conventions spring-boot-starter-parent
|\ |
| \__________ |
| | |
project-a project-b
-
I would suggest, conventions-for-spring (this has spring starter) and conventions... without doing some malabarism (i.e using external like tiles) i'm not sure if there is a better option. but that's me, someone else might be able to help.Jorge Campos– Jorge Campos2025年05月29日 15:56:44 +00:00Commented May 29, 2025 at 15:56
-
1Make a separate pom file; define the plugins you usually need and your configuration and use spring boot as a BOM instead of using it as a parent...khmarbaise– khmarbaise2025年05月29日 19:39:06 +00:00Commented May 29, 2025 at 19:39