其他蚂蚁的蚂蚁 [英] Ant for other ant's
问题描述
我有几个项目,其中大部分都有test"目标,它运行测试并将结果存储在属性test.faulire"中.
I have several projects, most of them has "test" target, which run tests and store results in property 'test.faulire'.
位于同一目录中的所有项目:
All projects located in same directory:
- big_project/someproject1
- big_project/someproject1/build.xml
- big_project/someproject2
- big_project/someproject2/build.xml
因此,在big_project"的根目录中,我想为以下内容创建一个 build.xml:
So, in root of 'big_project' i want to create one build.xml for:
对所有项目运行测试
Running test on all projects
如果 all 测试没问题,请在每个项目上运行deploy"任务.会很好如果我能通过一些部署每个项目的参数.
If all test ok, run "deploy" task on each project. It'll be very well if I could pass some deployment parameters to each project.
您将如何实现这种场景?
How would you realize this scenario ?
推荐答案
您可以查看 蚂蚁贡献.有了它,您可以像这样遍历所有目录:
You might have a look at the for task in ant-contrib. With it you could iterate over all directories like that:
<for param="dir">
<path>
<dirset dir="." includes="*"/>
</path>
<sequential>
<ant dir="${dir}" antfile="${dir}/build.xml" target="aTarget" />
</sequential>
</for>
这篇关于其他蚂蚁的蚂蚁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!