inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

윈도우 gradlew.bat build 에러 발생

781

작성자 없음

작성한 질문수 0

0

C:\Users\Yoon>cd C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring

C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring>gradlew.bat build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'hello-spring'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.5')
          - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 5s

"빌드하고 실행하기" 강의에서 위 에러가 발생하였습니다.

우선 저는 윈도우 사용자입니다.

java --version으로 확인해봐도 Java 17버전이고, 설정 가능한 모든 부분에서 17버전으로 바꿨는데도 에러가 발생합니다.

 

파일 링크 : https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view?usp=drive_link

java spring mvc spring-boot

답변 2

0

김영한

안녕하세요. liltjay님

파일을 다운로드 받으려고 하는데, 권한이 없습니다.

다음을 참고해서 권한을 풀어주세요.

https://docs.google.com/document/d/1j0jcJ9EoXMGzwAA2H0b9TOvRtpwlxI5Dtn3sRtuXQas/edit#heading=h.yzd7ugcaglvn

 

추가로 다음 내용들도 한번 검토해보시면 도움이 되실거에요.

https://docs.google.com/document/d/1j0jcJ9EoXMGzwAA2H0b9TOvRtpwlxI5Dtn3sRtuXQas/edit#heading=h.owcsqc19zslv

https://jojoldu.tistory.com/698

감사합니다.

0

liltjay

안녕하세요. 방금 권한 수정하였습니다. 감사합니다!

https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view

0

인프런 AI 인턴

안녕하세요, 인프런 AI 인턴입니다.

liltjay님의 질문은 스프링 부트 프로젝트의 빌드 과정에서 발생한 오류와 관련이 있습니다. 이러한 오류는 일반적으로 Java 버전과 관련된 호환성 문제일 때 자주 발생합니다. 여기서 문제는 사용하고 있는 Java 버전과 스프링 부트 Gradle 플러그인이 요구하는 Java 버전 간의 불일치로 보입니다.

이와 유사한 오류를 해결한 기존 게시물들을 참고하여 문제를 해결해 보시기 바랍니다. 아래 링크는 유사한 오류와 관련된 질문을 다루고 있으며, 이를 참조하시면 도움이 될 것입니다.

해당 게시물들을 참조하여 IDE 설정을 확인하고 Java 버전을 변경하는 등의 조치를 취해 보시기 바랍니다.

..

0

76

2

Unused property.....

0

101

2

project JDK is misconfigured

0

132

2

외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석

0

83

2

단위/통합 테스트 버전충돌 문제

0

91

2

❗️springboot 4.0.2 버전 aspectj dependency 설정❗️

0

230

1

왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?

0

104

2

윈도우 build test오류 질문

1

102

2

테스트 관련 공부에 대한 조언을 얻고 싶습니다

0

101

2

테스트 실행 시 에러 질문

0

291

1

name을 통한 비교와 객체를 통한 비교

0

77

1

빌드 후 libs 없음

1

129

1

윈도우 gradlew.bat 에러

0

167

1

@PostMapping("/members/new")가 동작하지 않습니다

0

89

1

java static class와 kotlin class

0

79

1

스프링 DB연결

0

126

1

소요 시간

0

87

2

ddl.sql에 빨간 밑줄

1

102

2

welcome page 에러

0

183

3

잘 모르겠습니다.

0

164

2

fail을 똑같이 쳤는데 오류가 발생해요

0

156

2

index.html Welcome page

0

124

1

프로젝트 gradle-groovy ?

0

369

1

테스트코드 메서드명 한글

0

202

2