본문 바로가기
카테고리 없음

Could not resolve all dependencies for configuration ':classpath'. > Using insecure protocols with repositories, without explicit opt-in, is unsupported.

by Mr-후 2025. 6. 2.
반응형

이 오류는 Gradle 7.x 이상에서 보안 정책이 강화되면서,
http://로 된 Maven 저장소를 사용할 경우 명시적으로 허용하지 않으면 빌드 실패하는 문제. 

build.gradle 또는 settings.gradle 안에 

maven {
    url "http://maven.icm.edu.pl/artifactory/repo/"
}

http형태의 의존성이 있다면 https로 변경하면 해결된다. 

그리고 다음과 같은 오류의 경우는 

A problem occurred evaluating root project 'kist-com.kirinote-server'. > Could not find method compile() for arguments [{group=javax.xml.bind, name=jaxb-api, version=2.3.0}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Gradle 7부터는 compile이 완전히 제거되었고, 대신 다음을 써야한다. 

이전 구문 (지원 안 됨)대체 구문 (Gradle 7+)
compile implementation
testCompile testImplementation
runtime runtimeOnly

 

반응형