Gant 100% Ant 兼容吗?
我编写了一些 Groovy 代码,我想将其与现有的 Java 代码集成。 我们希望能够保留 Ant 脚本,并且只添加所需的 Groovy 功能。 Gant 会允许我们保留现有的脚本吗?
I wrote some Groovy code, and I'd like to integrate it with the existing Java code. We'd like to be able to keep our ant scripts, and only add the needed Groovy functionality. Will Gant allow us to keep our existing scripts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据 Gant 站点,没有:
Gant 是一个使用 Groovy 而不是 XML 来指定逻辑的 Ant 任务脚本工具。 Gant 规范是 Groovy 脚本...
Gant 构建脚本使用 Groovy 脚本,而不是 XML,但它使用 Ant 任务。 因此,如果您有任何自定义 Ant 任务,您仍然可以使用它们。
According to the Gant site, no:
Gant is a tool for scripting Ant tasks using Groovy instead of XML to specify the logic. A Gant specification is a Groovy script ...
A Gant build script uses Groovy script, not XML, but it uses the Ant tasks. Therefore if you have any custom Ant tasks you will still be able to use those.
也许你可以提供更多关于你想做的事情的细节。
您可以从 Gant 调用普通 Ant 脚本,反之亦然。
您还可以使用 groovy ant 任务在正常(或 Gant 风格)ant 构建中运行任意 Groovy。
Perhaps you could give more detail about what you want to do.
You can call normal Ant scripts from Gant and vice-versa.
You can also use the groovy ant task to run arbitrary Groovy in your normal (or Gant-flavored) ant builds.
以下内容没有回答有关甘特的问题,
但这可能有助于解决问题:
Gradle 是一个 Groovy 构建工具。 它比 Gant 更复杂。
我在博客上写了这个 在这里。
来自 Gradle 常见问题解答(此处):
The following doesn't answer the question with respect to Gant,
but it might help with the problem:
Gradle is a Groovy-build tool. It is more sophisticated than Gant.
I've blogged on this here.
From the Gradle FAQ (here):