groovy - 切换到 Groovy 2.0 时 Gradle 中的 ClassNotFoundException

标签 groovy gradle

我使用 Gradle 来管理 Groovy 项目。 Groovy 设置为 1.8.6,然后我想切换到 Groovy 2.0。当我这样做时,我得到:

:compileGroovy

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> groovy/util/AntBuilder

如果我从 STS 或命令行运行它,也会发生同样的事情。

有什么我想念的想法吗?

最佳答案

Ant 支持现在位于一个单独的模块中。您需要添加对 groovy-ant 的依赖项也。

关于groovy - 切换到 Groovy 2.0 时 Gradle 中的 ClassNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11374157/

相关文章:

heroku - Gradle 应用程序无法启动

gradle - 从 1.6 到 1.8 的 Java 升级异常

java - 运行 gradle 构建时出错

grails - 像 Grails 中的图像这样的二进制文件的最佳数据类型是什么?

groovy - 如何在 Groovy 中整齐地打印新行?

Java/Groovy 文件 IO 用图像文件自己的内容替换图像文件 - 为什么这有效?

Android Studio 项目中的 Gradle 弃用 "Relying on packaging to define the extension of the main artifact..."可以修复吗?

android - Travis.yml ./gradlew : Permission denied

grails - 无法从Config.groovy访问外部化的grails.serverURL

xml - 在Groovy中按名称访问xml的子节点,同时迭代访问父节点