1

I created a super pom for our company. This super pom sets up our site goal including default copyright notice, and the standard tools we use like PMD, Checkbugs, JavaDocs, CPD, and JaCoCo. We also add in additional META-INF entries in jars and wars.

To use this super pom, we have it set as a parent in all of our projects:

<project>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.veggiecorp</groupId>
        <aartifactId>super_pom</artifactId>
        <version>1.5</version>
    </parent>
    <groupId>com.veggiecorp</groupId>
    <artifactId>myproject</artifactId>
    <version>1.2.2</version>
    ....
 </project>

This works very well for us until one set of projects started to use Spring Boot. Maven projects using Spring Boot jars require the Spring Boot parent pom:

<project>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <!-- Your own application should inherit from spring-boot-starter-parent -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.1.RELEASE</version>
    </parent>

    <groupId>com.veggiecorp</groupId>
    ....
</project>

Maven projects can't have multiple parent poms, and I don't know the mechanism we can use to use both our Super Pom and Spring Boot's parent pom which contains version numbers of all the jars used in the project.

How can I include both my company's super pom and the Spring Boot parent pom in the same application.

NOTE: There are dozens of these Spring Boot applications and they're all right now separate projects. I can't easily make them into a hierarchy where they have a parent pom which has another parent pom.

What is the best way to do this?

David W.
  • 105,218
  • 39
  • 216
  • 337
  • 2
    Possible duplicate of [Spring Boot - parent pom when you already have a parent pom](http://stackoverflow.com/questions/21317006/spring-boot-parent-pom-when-you-already-have-a-parent-pom) – A_Di-Matteo Jan 21 '16 at 20:37
  • "Spring Boot jars require the Spring Boot parent pom" no they do not. – Raedwald Jan 21 '16 at 20:50
  • @a-d-Matteo Thanks for the link. That may have solved the issue. It builds and looks good. I'll have to verify it. Raedwald. Without that parent Pom, the build fails. – David W. Jan 22 '16 at 00:47

0 Answers0