1

I have a bunch of modules which I'd like to all have their own ant build files. However, modules have dependencies on other modules. What's the best way to define dependencies between build files?

I've looked at the <import>, <ant>, and <antcall> tasks, but it seems like maybe there's a better way to do this.

4

2 回答 2

1

您可以考虑使用Apache Ivy ( features ) 来管理您的依赖项。有一个关于如何在多项目环境中使用 Ivy的教程,听起来就像你所追求的。我建议从头开始阅读这些教程,因为从头开始可能会有点棘手。

于 2009-03-23T11:21:14.933 回答
0

我尝试将所有定义放入Antlib并将它们包含在主build.xml文件中。如果您按照“约定优于配置”规则编写宏,您会惊讶地发现 Ant 可以如此简洁。

如果你想看一个例子,你可以看看的谷歌沙箱代码

于 2009-03-21T15:50:49.217 回答