gpt4 book ai didi

gradle - Grails 4新鲜插件无法解决Gradle依赖关系

转载 作者:行者123 更新时间:2023-12-02 15:16:04 24 4
gpt4 key购买 nike

此处的示例项目:https://github.com/Trebla7th/grails4-plugin-test

正在考虑将一些应用程序和插件升级到grails 4.从一个刚开始的项目开始只是为了获得它的感觉,使用“开箱即用”的grails插件无法编译。

grailsVersion=4.0.1
gorm.version=7.0.2.RELEASE

Gradle 5.1.1

尝试编译给出
Error |
Could not resolve all dependencies for configuration ':testRuntime'. Type 'gradle dependencies' for more information

运行'gradledependence --stacktrace'给出以下内容
Configuring signAndPublish task for project :
Applying dependency management to configuration 'assets' in project 'grails4-plugin-test'
Applying dependency management to configuration 'gspCompile' in project 'grails4-plugin-test'
Applying dependency management to configuration 'developmentOnly' in project 'grails4-plugin-test'
Resolving global dependency management for project 'grails4-plugin-test'

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'grails4-plugin-test'.
> Failed to notify project evaluation listener.
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each([Ljava/lang/Object;Lgroovy/lang/Closure;)[Ljava/lang/Object;

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'grails4-plugin-test'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79)
...snip...
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86)
...snip...
Caused by: java.lang.NoSuchMethodError:
org.codehaus.groovy.runtime.DefaultGroovyMethods.each([Ljava/lang/Object;Lgroovy/lang/Closure;)[Ljava/lang/Object;
at org.grails.gradle.plugin.core.GrailsGradlePlugin.buildClasspath(GrailsGradlePlugin.groovy:608)

该项目是使用“create-plugin”创建的,除某些代理配置外没有其他更改,以便下载依赖项。难道我做错了什么?

最佳答案

我的PATH上的gradle版本存在冲突,删除该版本可以使gradle依赖项得以解决...希望没有其他人遇到此问题。

关于gradle - Grails 4新鲜插件无法解决Gradle依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59772204/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com