When I upgraded our build to Groovy 2.0, I fund that some (but not all) of the Groovydoc tasks fail with the exception below. I haven’t found a clear pattern yet, but it is consistent.
As the Gradle distribution contains the ‘groovy-all’ jar, it should be able to resolve the class from there and not require that it is included in the project classpath.
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':zone:groovydoc'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
... snipped a lot of irrelevant stack frames
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
Caused by: java.lang.NoClassDefFoundError: groovy/util/AntBuilder
at java_lang_ClassLoader$loadClass.call(Unknown Source)
at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.groovy:106)
at org.gradle.api.internal.project.IsolatedAntBuilder$execute$1.call(Unknown Source)
at org.gradle.api.tasks.javadoc.AntGroovydoc.execute(AntGroovydoc.groovy:55)
at org.gradle.api.tasks.javadoc.Groovydoc.generate(Groovydoc.java:75)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 66 more
Caused by: java.lang.ClassNotFoundException: groovy.util.AntBuilder
... 79 more