0
下面是我gradle這個構建腳本:春季啓動gradle插件messes常春藤依賴配置?
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE")
}
}
apply plugin: 'spring-boot'
apply plugin: 'base'
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
repositories {
ivy {
url 'my.url'
}
}
dependencies {
archives group: 'my.group', name: 'artifact.name', version: '16.06.29.5144', configuration: 'dist'
}
在這裏面我嘗試一個依賴添加到archives
配置。這是依賴發佈到常春藤回購,它有幾個配置,其中一個dist
配置。但它沒有default
配置。現在
,如果我跑gradlew dependencies
我得到以下錯誤:
Execution failed for task ':dependencies'.
Could not resolve all dependencies for configuration 'detachedConfiguration4'.
> Module version :gtest:unspecified, configuration 'detachedConfiguration4' declares a dependency on configuration 'default' which is not declared in the module descriptor for my.group:artifact.name:16.06.29.5144
當我刪除spring-boot
插件,然後錯誤消失了,我看到預期的輸出:
archives - Configuration for archive artifacts.
\--- my.group:artifact.name:16.06.29.5144
任何想法,爲什麼spring-boot
插件打破對自定義配置的依賴?