-- gradle build error
A problem occurred configuring root project 'test-project'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.2.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.2
-- gralde sync
Gradle sync failed: No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 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.6' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 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.6')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a runtime of a component, and its dependencies declared externally:
- Incompatible beca... (show balloon)
-- build.gradle (error)
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'
}
-- build.gradle (수정)
plugins {
id 'java'
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.1.0'
}
plugins {
id 'java'
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.test.project'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
'skill > Etc' 카테고리의 다른 글
공동 작업 시, npm install, npm audit fix --force 오류 (0) | 2023.03.30 |
---|---|
MAC .jmx 실행 및 요약보고서 Error 확인 방법 - jmeter (성능테스트) (0) | 2023.03.30 |
mac host 변경 및 확인 (0) | 2020.09.11 |
Android Studio strings.xml 오류 is translated here but not found in default locale 해결 (1) | 2019.02.11 |
log4j mybatis 로그 나오지 않을 때 (0) | 2016.12.19 |