I'm trying to merge two Maven projects into one while both of them have <parent>
section. Since one of them is a Spring-Boot project, according to this documentation, I should be able to include the necessary dependencies for Spring-Boot into my project by an import:
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
But when I remove the parent section of the Maven project and add the above tag to my <dependencyManagement>
, the code does not compile anymore with the following error message:
Error:(5, 45) java: package org.springframework.boot.test.context does not exist
Can someone please tell me how to switch from <parent>
to <dependencyManagement>
?