個人的にGradleはよく分かってないので突っ込まれると回答できません。ご了承下さい。
※ 一概に「Could not resolve all artifacts for configuration」のエラーが出たら、ここの対処をすれば良いと言うわけではない点にご注意下さい。
環境
Mac
Spring Boot 1.3.6
Gradle 4.9 (Homebrew)
エラー内容
gradle eclipse
等を実行すると以下のエラーが発生する。
* What went wrong: A problem occurred configuring root project 'Test'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}. Required by: project :
build.gradle(一部抜粋)
buildscript { ext { springBootVersion = '1.3.6.RELEASE' } repositories { mavenCentral() } dependencies { classpath 'org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}' // Gradle4対応 classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE' } }
対処方法
build.gradle(一部抜粋)
buildscript { ext { springBootVersion = '1.3.6.RELEASE' } repositories { mavenCentral() } dependencies { // 変数ではなく固定値にする classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE' // Gradle4対応 classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE' } }
Gradle徹底入門 次世代ビルドツールによる自動化基盤の構築
- 作者: 綿引琢磨,須江信洋,林政利,今井勝信
- 出版社/メーカー: 翔泳社
- 発売日: 2014/11/05
- メディア: 大型本
- この商品を含むブログ (6件) を見る