-
Notifications
You must be signed in to change notification settings - Fork 20
Gradle
Gábor Szárnyas edited this page Jun 6, 2016
·
20 revisions
Problem:
* What went wrong:
Execution failed for task ':compileGroovy'.
> org/apache/ivy/core/report/ResolveReport
[...]
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileGroovy'.
[...]
Caused by: java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:167)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:54)
at org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer.execute(CompilerDaemonServer.java:55)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:364)
... 2 more
Caused by: java.lang.ClassNotFoundException: org.apache.ivy.core.report.ResolveReport
... 8 more
Solution: Add the ivy
configuration (see the example).
apply plugin: 'groovy'
repositories {
mavenCentral()
}
configurations {
ivy
}
dependencies {
compile group: 'org.codehaus.groovy', name: 'groovy', version: '2.4.6'
ivy group: 'org.apache.ivy', name: 'ivy', version: '2.4.0'
}
tasks.withType(GroovyCompile) {
groovyClasspath += configurations.ivy
}
"That said, a better approach is to manage dependencies with Gradle."
(Source: http://stackoverflow.com/questions/18173908/error-compiling-a-groovy-project-using-grab-annotation)