我有个项目
-MyProject
main.pom
- spring-boot
spring-boot.pom
- maven module
module.pom
- maven module2
module2.pomMyProject是属性中具有vwrsions的父级。module和module2地址,并具有parnet - MyProject
例如在main pom中:
<properties>
<spring.ws.version>3.0.0.RELEASE</spring.ws.version>
....
</properties>在module和module2 pom中:
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>${spring.ws.version}</version>
</dependency>因为:
<parent>
<artifactId>main.project</artifactId>
<groupId>a.project</groupId>
<version>1.0-SNAPSHOT</version>
</parent>但在spring boot模块中已经是父模块了:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M6</version>
<relativePath/>
</parent>如何将parent更改为MyProject并使用spring boot?
发布于 2017-11-14 15:02:35
您可以将Spring Boot父pom定义放在父pom的依赖项管理部分中。
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.8.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>https://stackoverflow.com/questions/47279386
复制相似问题