bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

"apply plugin: 'clover'" failing #41

Closed jimsimon closed 10 years ago

jimsimon commented 10 years ago

Entire build file:

apply plugin: "clover"
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.gradle.api.plugins:gradle-clover-plugin:0.8'
    }
}

Debug output:

15:40:05.064 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
15:40:05.065 [ERROR] [org.gradle.BuildExceptionReporter] Build file build.gradle' line: 1
15:40:05.066 [ERROR] [org.gradle.BuildExceptionReporter] 
15:40:05.066 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:40:05.067 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project.
15:40:05.068 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find method create() for arguments [cloverAggregateDatabases, class org.gradle.api.plugins.clover.AggregateDatabasesTask] on task set.
15:40:05.070 [ERROR] [org.gradle.BuildExceptionReporter] 
15:40:05.072 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:40:05.074 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project.
15:40:05.077 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
15:40:05.078 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
15:40:05.078 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
15:40:05.079 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:44)
15:40:05.080 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:464)
15:40:05.081 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:77)
15:40:05.082 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.DefaultBuildConfigurer$ConfigureProject.execute(DefaultBuildConfigurer.java:38)
15:40:05.083 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.DefaultBuildConfigurer$ConfigureProject.execute(DefaultBuildConfigurer.java:36)
15:40:05.083 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:440)
15:40:05.084 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:435)
15:40:05.085 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:32)
15:40:05.085 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
15:40:05.086 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
15:40:05.086 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
15:40:05.087 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:65)
15:40:05.087 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.tooling.internal.provider.DelegatingBuildModelAction.run(DelegatingBuildModelAction.java:44)
15:40:05.088 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:103)
15:40:05.089 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
15:40:05.089 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)
15:40:05.090 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
15:40:05.091 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.092 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
15:40:05.093 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.094 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
15:40:05.094 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.095 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
15:40:05.096 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.097 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
15:40:05.097 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.098 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:70)
15:40:05.099 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:68)
15:40:05.099 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.util.Swapper.swap(Swapper.java:38)
15:40:05.099 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:68)
15:40:05.100 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.101 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
15:40:05.102 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
15:40:05.102 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.103 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
15:40:05.104 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
15:40:05.104 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.105 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
15:40:05.105 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
15:40:05.105 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
15:40:05.107 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
15:40:05.107 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.108 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
15:40:05.108 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.109 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
15:40:05.110 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
15:40:05.110 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
15:40:05.111 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
15:40:05.112 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
15:40:05.113 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
15:40:05.113 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
15:40:05.114 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.MissingMethodException: Could not find method create() for arguments [cloverAggregateDatabases, class org.gradle.api.plugins.clover.AggregateDatabasesTask] on task set.
15:40:05.115 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:68)
15:40:05.115 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:56)
15:40:05.116 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:172)
15:40:05.117 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated.invokeMethod(Unknown Source)
15:40:05.118 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.plugins.clover.CloverPlugin.configureAggregateDatabasesTask(CloverPlugin.groovy:74)
15:40:05.118 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.plugins.clover.CloverPlugin.this$2$configureAggregateDatabasesTask(CloverPlugin.groovy)
15:40:05.119 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.plugins.clover.CloverPlugin$this$2$configureAggregateDatabasesTask.callCurrent(Unknown Source)
15:40:05.120 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.plugins.clover.CloverPlugin.apply(CloverPlugin.groovy:59)
15:40:05.120 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.plugins.clover.CloverPlugin.apply(CloverPlugin.groovy)
15:40:05.121 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:107)
15:40:05.122 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:71)
15:40:05.122 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
15:40:05.123 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
15:40:05.123 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
15:40:05.124 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
15:40:05.125 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
15:40:05.125 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:846)
15:40:05.126 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.Project$apply.call(Unknown Source)
15:40:05.126 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
15:40:05.127 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.Script$apply.callCurrent(Unknown Source)
15:40:05.128 [ERROR] [org.gradle.BuildExceptionReporter]    at build_6ac1g2civhphr62omm67tg6o07.run(D:\git\project\project-web\build.gradle:1)
15:40:05.128 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
15:40:05.129 [ERROR] [org.gradle.BuildExceptionReporter]    ... 53 more

Let me know if you need any more details.

bmuschko commented 10 years ago

I am assuming that you are using a relatively old version of Gradle. Is that correct? You will highly like have to upgrade your Gradle version to be able to use the current version of the plugin. For more information see issue #29.

jimsimon commented 10 years ago

I'm running the script via the Gradle plugin for Eclipse: http://marketplace.eclipse.org/content/gradle-integration-eclipse?mpc=true&mpc_state=

I"m using a Gradle run configuration within Eclipse to actually run Gradle.

It looks like the Gradle Eclipse plugin comes with Gradle 1.5, which as you said is fairly old.

jimsimon commented 10 years ago

I downgraded to version 0.6.2 of the plugin and it appears to be working now, so this does appear to be a conflict with the Eclipse tooling's version of Gradle.

bmuschko commented 10 years ago

I personally don't use the Eclipse integration for Gradle but I can't imagine that it determine the Gradle runtime version for your build script. The version required by your build should be the Gradle Wrapper you choose to use and not the one provided by the IDE. I would go with SpringSource STS which has Gradle integration out-of-the-box.

I am going to close this issue as this is not an problem with the plugin.

jimsimon commented 10 years ago

The one I'm using is actually the SpringSource STS integration packaged as a standalone plugin: https://github.com/spring-projects/eclipse-integration-gradle.

Digging into the plugin options, it appears that you can override the built-in gradle runtime with your own, so I'll probably explore that route.

Thanks for the help!