0

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
asked May 29, 2025 at 13:54
2
  • 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. Commented May 29, 2025 at 15:56
  • 1
    Make 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... Commented May 29, 2025 at 19:39

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.