Multi module project spring boot parent

If you are using a spring boot in your application then you might stumble upon spring-boot-parent artifact is represented this way e.g.

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.2.RELEASE</version>
<relativePath /> <
</parent>

But in case if you already have multi-module project setup, you might have existing parent structure. How to integrate two?

Solution:

Just keep your existing project structure as it is and instead of the above spring block add a dependency management section in pom. e.g

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<type>pom</type>
<version>${springboot.version}</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

This was suggested on the stackoverflow & it did trick for me 🙂

Leave a comment

Your comment

*