gpt4 book ai didi

grails - 没有这样的属性:类别:org.gradle.api.plugins.JavaPlugin的COMPILE_ONLY_CONFIGURATION_NAME

转载 作者:行者123 更新时间:2023-12-02 14:22:20 25 4
gpt4 key购买 nike

我有Groovy和Grails项目,并且使用了 Assets 管道。

Grails:3.0.17#Gradle:2.12

在我的build.gradle文件中,我应用了 Assets 管道,如下所示:

apply plugin: "asset-pipeline"

在构建项目时,我遇到以下错误:

org.gradle.api.GradleScriptException: A problem occurred evaluating project ':ciab-base'. at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:154) 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:59) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:492) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:86) at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47) 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:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) 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:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56) Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'asset-pipeline'] at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:147) at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:102) 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 org.gradle.api.plugins.PluginAware$apply.call(Unknown Source) at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34) at org.gradle.api.Script$apply$0.callCurrent(Unknown Source) at build_eutmpfkdca3gfie59pyomub8f.run(/home/urvin/Urvin/Repo/ciab-plugin/ciab-base/build.gradle:32) at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52) ... 35 more Caused by: groovy.lang.MissingPropertyException: No such property: COMPILE_ONLY_CONFIGURATION_NAME for class: org.gradle.api.plugins.JavaPlugin at asset.pipeline.gradle.AssetPipelinePlugin$_createGradleConfiguration_closure2.doCall(AssetPipelinePlugin.groovy:191) at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67) at org.gradle.internal.Actions$FilteredAction.execute(Actions.java:201) at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110) at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115) at org.gradle.api.internal.DefaultDomainObjectCollection.withType(DefaultDomainObjectCollection.java:126) at org.gradle.api.DomainObjectCollection$withType$0.call(Unknown Source) at asset.pipeline.gradle.AssetPipelinePlugin.createGradleConfiguration(AssetPipelinePlugin.groovy:189) at asset.pipeline.gradle.AssetPipelinePlugin.apply(AssetPipelinePlugin.groovy:52) at asset.pipeline.gradle.AssetPipelinePlugin.apply(AssetPipelinePlugin.groovy) at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35) at org.gradle.api.internal.plugins.RulesCapablePluginApplicator.applyImperative(RulesCapablePluginApplicator.java:42) at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:133) ... 46 more

最佳答案

我有同样的错误。

这是由于正在使用的grails版本(预期gradle 2.11)与 Assets 管道插件(需要2.12)之间不匹配。

为了解决这个问题,您可以使用grails作为开始(通过您的gradle路径代替):

$ GRAILS_GRADLE_HOME=~/.sdkman/candidates/gradle/2.12/ grails

关于grails - 没有这样的属性:类别:org.gradle.api.plugins.JavaPlugin的COMPILE_ONLY_CONFIGURATION_NAME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45566027/

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