...
코드 블럭 | ||||
---|---|---|---|---|
| ||||
<dependencyManagement> <dependencies> <dependency> <groupId>com.example</groupId> <artifactId>X</artifactId> <version>2.0</version> </dependency> </dependencies> </dependencyManagement> |
일괄 버전 고정하기
규모가 큰 프로젝트는 여러 모듈로 쪼개져 있습니다(예; Spring Boot). 통상적으로 문제가 안되지만 Spring Boot를 dependency로 하는 다른 외부 dependency를 추가하다보면 Spring Boot의 버전이 다를 수 있습니다.
...
상기와 같은 경우 Spring Boot의 POM을 import하여 버전을 일괄 적용할 수 있습니다. 물론 이슈는 생길 수 있으나 버전은 일괄 적용할 수 있습니다상기와 같은 구조를 가진 프로젝트에서는 Super POM에 다음과 같이 추가하면 됩니다.
코드 블럭 | ||||
---|---|---|---|---|
| ||||
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.2.6.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> |
...