- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有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/
我是一名优秀的程序员,十分优秀!