Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

trouble 2.1.0.RELEASE trouble groovy all

honeymon edited this page Jun 20, 2019 · 1 revision

스프링 부트 2.1.0 이후 그루비 2.5 적용(groovy-all) 미지원

스프링 부트 2.1.0 이 되면서 관리하는 groovy 버전이 2.4 에서 2.5(http://groovy-lang.org/releasenotes/groovy-2.5.html)로 변경되었다. 이 과정에서 그루비 자체의 groovy-all 에 대한 정책도 변경되었다.

그루비 2.5 가 되면서 코어 groovy jar 와 여러 개 "모듈" jar로 구성되었다. 그루비의 모듈은 자바 9 이상의 모듈과는 다르다. 모듈 구성이 변경되면서 groovy-all 이라는 편의는 제공하지 않지만 동등한 구성요소를 가져오는 all pom은 제공한다.

테스트 프레임워크 스폭(Spock)를 사용하기 위해 groovy-all 을 사용했었다면, 스프링 부트에서는 다음과 같이 모듈을 변경해야 한다.

2.1.0.RELEASE 이전
testCompile('org.codehaus.groovy:groovy-all') // (1)
testCompile('org.spockframework:spock-core:1.1-groovy-2.4')
testCompile('org.spockframework:spock-spring:1.1-groovy-2.4')
  1. 스프링 부트에서는 groovy-all 에 대한 의존성을 관리하지 않는다.

2.1.0.RELEASE 이후 - groovy-all 버전 명시
testCompile('org.codehaus.groovy:groovy-all:3.0.0-alpha-3') // (1)
testCompile('org.spockframework:spock-core:1.1-groovy-2.4')
testCompile('org.spockframework:spock-spring:1.1-groovy-2.4')
  1. 3.0.0 이상을 사용해야 할 것으로 보인다.

스프링 부트 2.1.0 이후로 groovy-all에 대한 버전을 명시하지 않으면 다음과 같은 오류를 접하게 될 것이다.

FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':boot-spring-boot:compileClasspath'.
> Could not find org.codehaus.groovy:groovy-all:. // (1)
  1. 스프링 부트 2.1.0 부터는 groovy-all 버전을 관리하지 않는다.

2.1.0.RELEASE 이상
testCompile('org.codehaus.groovy:groovy') // (1)
testCompile('org.codehaus.groovy:groovy-test') // (1)
testCompile('org.spockframework:spock-core:1.2-groovy-2.5')
testCompile('org.spockframework:spock-spring:1.2-groovy-2.5')
  1. groovy, groovy-test 를 선언하다.

Note
라이브러리들이 java 9 이상하게 되면서 패키지 관리정책에 모듈화를 반영하는 추세인 듯 하다. @_@)

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /