【发布时间】:2013-05-22 19:19:56
【问题描述】:
如果你想在 Ant 中运行 Groovy 脚本,你可以像这样使用script task:..
<script language="groovy">
//foo
</script>
..或groovy task 这样的:
<groovy>
//foo
</groovy>
这两种方式都需要下载 Groovy 库。我发现了一个看起来很有前途的 Ant 配置,它会在这个答案中自动执行此操作:Execute my groovy script with ant or maven
现在我的问题:
这两个 Ant 任务中的哪一个用于运行 Groovy 脚本? script 或 groovy?
另外,如果 Ant 中包含支持 groovy 的脚本任务,那么“附加”groovy 任务的目的是什么?
我还想引用我在这里找到的一篇博文:http://jbetancourt.blogspot.co.at/2012/03/run-groovy-from-ants-script-task.html
当然,当“groovy”任务可用时,为什么还要使用“脚本”任务呢?你不会的。
有人同意这篇文章的作者吗?如果是这样 - 你能解释一下它背后的想法吗?
【问题讨论】: