해결된 질문
작성
·
587
·
수정됨
1
A problem occurred configuring root project 'library-app'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.5')
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
수업자료로 제공되는 압축파일을 받았는데요. jdk 11 설치 후 gradle sync를 누르면 위와 같은 에러가 나오는데요. 강의 설명에서는 11을 깔라고 하셔서 진행하는데 잘 안되네요.
build.gradle 파일에 다음과 같이 선언되어 있는데, 스프링부트 3.0.1 버전에서는 17이 호환되는 거 같아서 질문드립니다. jdk 17깔고 설정하니 gradle install은 잘 되네요.
```
plugins { id 'org.springframework.boot' version '3.0.1' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' }
```
답변 1
1
안녕하세요 호정님! 질문 올려주셔서 감사합니다!! 🙂
혹시 "최종 완성 버전"을 다운로드 하신건 아닌가 싶습니다!!!
현재 압축 파일을 두 개 제공해 드리고 있는데요~
처음 시작하기 위한 용도
spring 2.7.x 버전 + Java 11 버전
최종 완성본 코드 비교 용도
spring 3.0.x 버전 + Java 17 버전
이렇게 두 가지 입니다!
만약 후자를 다운로드 받으셨다면, spring 3.0.x 버전의 최소 Java 버전이 17버전이기 때문에 JDK 17을 잘 설치 해주신게 맞습니다!!
답변이 도움이 되었다면 좋겠습니다~ 감사합니다!!! 🙏
아 두개가 제공되는 줄 몰랐네요. 최종본을 받아서 실행을 했습니다. 후자는 jdk 17로 돌아가는 것을 확인했는데요.
17버전으로 start.spring.io에서 받은 후에 에러 나는거 고쳐서 우선 세팅은 진행해서 하고 있었는데, 올려주신 다른 압축파일을 이용하도록 하겠습니다 답변감사합니다!