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
插件打破对自定义配置的依赖?