此处的示例项目:https ://github.com/Trebla7th/grails4-plugin-test
考虑将一些应用程序和插件升级到 grails 4. 从一个新项目开始只是为了感受它,使用“开箱即用”的 grails 插件无法编译。
grailsVersion=4.0.1
gorm.version=7.0.2.RELEASE
毕业 5.1.1
尝试编译给出
Error |
Could not resolve all dependencies for configuration ':testRuntime'. Type 'gradle dependencies' for more information
运行 'gradle dependencies --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”创建的,然后除了一些代理配置之外没有任何变化,以获取要下载的依赖项。难道我做错了什么?