인프런 커뮤니티 질문&답변
Could not resolve org.springframework.boot:spring-boot-starter-validation:2.4.4
작성
·
16
·
수정됨
0
[질문 템플릿]
1. 강의 내용과 관련된 질문인가요? (예)
2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)
3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)
[질문 내용]
eclipse 환경에서 validation 예제를 따라가고 있었는데 Bean Validation 강의부터 라이브러리가 다운받아지지 않습니다.
Could not resolve: org.springframework.boot:spring-boot-starter-validation:2.4.4
위와 같은 메세지가 출력되면서 외부 의존성 라이브러리를 확인해봤을 때, jakarta.validation-api
hibernate-validator 라이브러리가 추가되지 않는 것을 확인했습니다. 검색해도 해결방안을 찾지 못해 질문 남깁니다. 어떻게 해결할 수 있을까요?
추가로 Eclipse는 4.16.0 버전 사용중입니다.
답변 2
0
gradle 프로젝트를 터미널에서 직접 refresh 시도를 했는데 다음과 같은 오류가 발생했습니다.
D:\study\mvc2\validation-start>gradlew build --refresh-dependencies
Starting a Gradle Daemon, 3 incompatible Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'validation'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-buildpack-platform:2.4.4.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.4.4 > org.springframework.boot:spring-boot-gradle-plugin:2.4.4
> Could not resolve org.springframework.boot:spring-boot-buildpack-platform:2.4.4.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/2.4.4/spring-boot-buildpack-platform-2.4.4.pom'.
> Could not HEAD 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-buildpack-platform/2.4.4/spring-boot-buildpack-platform-2.4.4.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.springframework.boot:spring-boot-loader-tools:2.4.4.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.4.4 > org.springframework.boot:spring-boot-gradle-plugin:2.4.4
> Could not resolve org.springframework.boot:spring-boot-loader-tools:2.4.4.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/2.4.4/spring-boot-loader-tools-2.4.4.pom'.
> Could not HEAD 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.4.4/spring-boot-loader-tools-2.4.4.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.apache.commons:commons-compress:1.20.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.4.4 > org.springframework.boot:spring-boot-gradle-plugin:2.4.4
> Could not resolve org.apache.commons:commons-compress:1.20.
> Could not get resource 'https://plugins.gradle.org/m2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom'.
> Could not HEAD 'https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.20/commons-compress-1.20.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.springframework:spring-core:5.3.5.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:2.4.4 > org.springframework.boot:spring-boot-gradle-plugin:2.4.4
> Could not resolve org.springframework:spring-core:5.3.5.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/spring-core/5.3.5/spring-core-5.3.5.pom'.
> Could not HEAD 'https://repo.maven.apache.org/maven2/org/springframework/spring-core/5.3.5/spring-core-5.3.5.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* 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 10s
0
안녕하세요, 인프런 AI 인턴입니다. 연우님.
Eclipse 환경에서 Spring Boot 프로젝트의 특정 Dependency를 해결하지 못하는 문제는 종종 발생할 수 있습니다. 이는 보통 Gradle 설정이나 네트워크 문제로 인해 발생될 수 있습니다. 다음 몇 가지 해결 방법을 시도해 보십시오:
- build.gradle 파일 확인: 해당 의존성을 올바르게 설정했는지 확인해 주세요. 버전 번호(
2.4.4)가 정확한지 다시 한번 확인하세요.spring-boot-starter-validation의존성은 명확하게 추가되어 있어야 합니다.
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation:2.4.4'
}
- Maven Central 사용: Gradle이 의존성을 다운로드할 수 있도록 Maven Central을 방법으로 명시하십시오.
repositories {
mavenCentral()
}
Gradle 캐시 삭제: 프로젝트의 문제일 수 있으니, Gradle 캐시를 삭제한 후 다시 빌드해 보세요. 명령어
./gradlew clean또는gradle clean을 실행한 후./gradlew build를 시도해 보세요.인터넷 연결 확인: 의존성은 Maven Repository에서 다운로드되므로 인터넷 연결이 원활한지 확인하세요.
Gradle Wrapper 업데이트: Gradle의 버전이 낮은 경우, 최신 버전으로 Gradle Wrapper를 업데이트하는 것도 해결책이 될 수 있습니다.
gradle-wrapper.properties파일을 수정하여 더 최신의 Gradle 버전을 사용해 보세요.
만약 위의 방법으로도 해결되지 않는다면, 다음의 추가 정보를 포함하여 인프런 Q&A에 다시 질문을 남겨주시면 보다 정확한 도움을 받을 수 있습니다:
- build.gradle 또는 pom.xml 파일의 전체 내용
- 사용 중인 Spring Boot 버전과 Eclipse 버전
현재 관련있는 질문이 아래 포함되어 있으며, 참고하시기 바랍니다:
- Can’t resolve dependency 관련 질문: 여기에서 의존성 문제 해결을 위한 또 다른 방법을 찾아볼 수 있습니다.
저는 질문자님의 이해를 돕고자 지식공유자님의 기존 답변을 참고하여 유사한 답변 링크를 추천해드리고 있습니다.
현재 베타 기능으로 답변이 만족스럽지 않을 수 있는 점 양해 부탁드립니다. 🙏
추가적으로 궁금한 점이 있으시면, 이어서 질문해 주세요. 곧 지식공유자께서 답변해 주실 것입니다.





