蚂蚁其他蚂蚁 [英] Ant for other ant's

查看:151
本文介绍了蚂蚁其他蚂蚁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个项目,其中大部分已的测试的目标,其中运行测试并将结果存储在财产的 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:


  1. 在所有项目上运行测试

  1. Running test on all projects

如果的所有的测试OK,运行的部署的每个项目任务。这将是很好
如果我可以通过一些部署
参数每个项目。

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 ?

推荐答案

您可以看看在的为的任务http://ant-contrib.sourceforge.net /相对=nofollow>蚂蚁的contrib 。有了它,你可以遍历所有目录,这样的:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆