蚂蚁为其他蚂蚁服务
我有几个项目,其中大多数都有“test”目标,它运行测试并将结果存储在属性“test.faulire”中。
所有项目都位于同一目录中:
- big_project / someproject1
- big_project / someproject1 / build.xml
- big_project / someproject2
- big_project / someproject2 / build.xml
因此,在“big_project”的根目录中,我想创建一个 build.xml for:
在所有项目上运行测试
如果所有测试正常,则在每个项目上运行“部署”任务。会很好的 如果我可以通过一些部署 每个项目的参数。
你会如何实现这个场景?
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
So, in root of 'big_project' i want to create one build.xml for:
Running test on all projects
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以查看 ant-contrib 中的 for 任务。有了它,您可以像这样迭代所有目录:
You might have a look at the for task in ant-contrib. With it you could iterate over all directories like that:
查看 Ant 有关“subant”任务的手册页。该页面包含有关如何按照您想要的方式使用该任务的示例。
Have a look at the Ant manual page on the 'subant' task. The page contains examples on how to use the task the way you want to.