无法应用 io.spring.dependency-management Gradle 插件
我在所有工作构建中都使用了 io.spring.dependency-management Gradle 插件,并且从未遇到过任何问题。它就是有效的。 以下是我本地设置的部分内容:
build.gradle:
plugins {
...
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
...
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR8'
}
}
settings.gradle:
pluginManagement {
resolutionStrategy {
eachPlugin {
switch (requested.id.id) {
...
case 'io.spring.dependency-management':
useModule("io.spring.gradle:dependency-management-plugin:${requested.version}")
break
...
当我尝试构建时,我可以在日志中看到:
Apply plugin io.spring.dependency-management to root project 'my-project' completed
...
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > A problem occurred evaluating root project 'my-project'
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > No signature of method: build_97hpysomemorerandomshere.dependencyManagement() is applicable for argument types: (build_97hpysomemorerandomshere$_run_closure4) values: [build_97hpysomemorerandomshere$_run_closure4@2d5aa553]
对我来说,这只是告诉我尚未应用依赖项管理,因此该插件附带的功能无法访问。
我一直看着拼写,直到我累了,我对自己做错了什么有点不知道。
预先感谢您的帮助。
I am using the io.spring.dependency-management
Gradle plugin in all our work builds and never had an issue with it. It just works.
Here are parts of my local setup:
build.gradle:
plugins {
...
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
...
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR8'
}
}
settings.gradle:
pluginManagement {
resolutionStrategy {
eachPlugin {
switch (requested.id.id) {
...
case 'io.spring.dependency-management':
useModule("io.spring.gradle:dependency-management-plugin:${requested.version}")
break
...
When I try to build I can see in the logs:
Apply plugin io.spring.dependency-management to root project 'my-project' completed
...
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > A problem occurred evaluating root project 'my-project'
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > No signature of method: build_97hpysomemorerandomshere.dependencyManagement() is applicable for argument types: (build_97hpysomemorerandomshere$_run_closure4) values: [build_97hpysomemorerandomshere$_run_closure4@2d5aa553]
To me this is just telling me the dependency-management has not been applied and such the functions coming with that plugin are not accessible.
I look at the spellings until I got tired and I am a bit out of ideas about what I am doing wrong.
Thank you in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论