1、gradle-2.4 --gradle-4.10.2试过这两个版本
2、开发工具IDEA
3、JDK1.8
执行编译命令 gradlew cleanIdea idea --stacktrace 报错如下:
F:\00_MyCood\04_TeamGit\Spring\v3.2.0.RELEASE\spring-framework-3.2.0.RELEASE>gradlew cleanIdea idea --stacktrace
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar
:buildSrc:assemble
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build
FAILURE: Build failed with an exception.
* Where:
Build file 'F:\00_MyCood\04_TeamGit\Spring\v3.2.0.RELEASE\spring-framework-3.2.0.RELEASE\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'spring'.
> Failed to apply plugin [id 'propdeps']
> java.lang.String cannot be cast to org.gradle.api.artifacts.Configuration
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'spring'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:76)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:156)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:487)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:85)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'propdeps']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:160)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46)
at build_3a9j82g90rcb2k2s394h7bkgl$_run_closure1.doCall(F:\00_MyCood\04_TeamGit\Spring\v3.2.0.RELEASE\spring-framework-3.2.0.RELEASE\
build.gradle:20)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91)
at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:819)
at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:824)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:232)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:127)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:150)
at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
at build_3a9j82g90rcb2k2s394h7bkgl.run(F:\00_MyCood\04_TeamGit\Spring\v3.2.0.RELEASE\spring-framework-3.2.0.RELEASE\build.gradle:12)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:74)
... 38 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.gradle.api.artifacts.Configuration
at org.gradle.api.artifacts.Configuration$Namer.determineName(Configuration.java:87)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.add(DefaultNamedDomainObjectCollection.java:80)
at java_util_Set$add.call(Unknown Source)
at org.springframework.build.gradle.propdep.PropDepsPlugin.addConfiguration(PropDepsPlugin.groovy:54)
at org.springframework.build.gradle.propdep.PropDepsPlugin.this$2$addConfiguration(PropDepsPlugin.groovy)
at org.springframework.build.gradle.propdep.PropDepsPlugin$this$2$addConfiguration.callCurrent(Unknown Source)
at org.springframework.build.gradle.propdep.PropDepsPlugin.apply(PropDepsPlugin.groovy:41)
at org.springframework.build.gradle.propdep.PropDepsPlugin.apply(PropDepsPlugin.groovy)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144)
... 56 more
BUILD FAILED
Total time: 14.834 secs
<p>It seems you have problem with: 'org.springframework.build.gradle:propdeps-plugin:0.0.1' and gradle 2.0 which may not compatible with each other.</p>
I will suggest you try following combinations: 'org.springframework.build.gradle:propdeps-plugin:0.0.6' + gradle 1.12 or 2.0
我也碰到了。。这是找的答案不知道能不能解决你的问题
谢谢,版本问题我也怀疑尝试过好几种,
propdeps-plugin:0.0.6 + gradle 1.3这种方式是可行的,可以解决不兼容问题
<p>stack overflow上网友说:'org.springframework.build.gradle:propdeps-plugin:0.0.1'和gradle 2.0可能彼此不兼容,然后尝试了<br> propdeps-plugin:0.0.6 + gradle 1.12<br> propdeps-plugin:0.0.7 + gradle 2.0</p>
propdeps-plugin:0.0.6 + gradle 1.3 -- 这种方式可行
<p>spring-framework-3.2.0.RELEASE版本编译出现很多问题,最后我更换了spring-framework-3.2.18.RELEASE版本。这个版本编译只出现了一个错误;<img height="363" src="https://oscimg.oschina.net/oscnet/4dde27d8d43881ec330f981c52ca9d8802d.jpg" width="1648"></p>
解决方法:
根据提示 找到对应的 spring-xxx/xxx.gradle 配置文件 删除相应的test配置
我这边报错的是 spring-oxm.gradle line 123
我直接删除了 配置文件中 compileTestJava部分的配置
在重新编译就OK
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。