Grails ant 任务不起作用 - 无法启动 Grails:java.lang.reflect.InitationTargetException

发布于 2024-09-28 15:11:46 字数 659 浏览 13 评论 0原文

我在使用 Grails 运行一些看似非常基本的东西时遇到了问题。我想从 Ant 脚本调用 grails 命令 - Grails 提供了 Grails 任务来实现此目的。我已经按照文档定义了 Grails taskdef 和类路径,但是,无论我调用什么命令,我都会遇到相同的错误...

grails-compile:
   [grails] Resolving dependencies...
   [grails] Dependencies resolved in 1192ms.

BUILD FAILED
/java/grailstest/build.xml:22: Unable to start Grails: java.lang.reflect.InvocationTargetException

即使当我使用“grails create-app”创建新的 Grails 应用程序,然后运行集成 ant 命令时'grailsintegrate-with--ant' 来生成默认的 build.xml,在运行生成的 build.xml 中的任何任务时,我都会遇到相同的错误。

我已经用 Grails 1.3.1、1.3.4 和 1.3.5 对此进行了测试,并且得到了相同的错误。

还有其他人遇到过这个问题吗?我一定做错了什么愚蠢的事情,否则这永远不会走出 Grails 工厂的大门......;)

I'm having issues getting something which seems very basic running with Grails. I want to call grails commands from an Ant script - Grails provides a Grails task to achieve this. I have defined the Grails taskdef and classpaths as per the docs however, no matter what command I call I get the same error...

grails-compile:
   [grails] Resolving dependencies...
   [grails] Dependencies resolved in 1192ms.

BUILD FAILED
/java/grailstest/build.xml:22: Unable to start Grails: java.lang.reflect.InvocationTargetException

Even when I create a new Grails app using 'grails create-app' and then run the integrate ant command 'grails integrate-with --ant' to generate a default build.xml, I get the same error when running any of the tasks in the generated build.xml.

I've tested this with Grails 1.3.1, 1.3.4 and 1.3.5 and am getting the same error.

Has anyone else encountered this problem? There must be something stupid I'm doing wrong or this would never have made it out the door of the Grails factory... ;)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

叫嚣ゝ 2024-10-05 15:11:46

我忘了提及我正在使用 Ant 版本 1.8.1。我刚刚发现切换回 Ant 1.7.1 可以“解决”这个问题,但这并不是很理想,因为我需要 1.8.1 来完成其他构建任务。我将在 Grails 问题跟踪器上提交一个错误,因为似乎很多人都遇到了同样的问题。

I forgot to mention that I am using Ant version 1.8.1. I have just discovered that switching back to Ant 1.7.1 'solves' this problem but this is not really ideal as I need 1.8.1 for other build tasks. I'll submit a bug on the Grails issue tracker as it seems a lot of people are having the same problem.

风吹雨成花 2024-10-05 15:11:46

我刚刚发现同样的问题。似乎还不支持 Ant 1.8(但 Ant 1.7 是),请参阅 GRAILS-6897。一些用户抱怨文档没有严格说明。

I've just found the same issue. It seems that Ant 1.8 is not supported yet (but Ant 1.7 is), see GRAILS-6897. Some users have complained that the documentation does not state it strictly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文