running specific target in different ant scripts in different directories

只愿长相守 提交于 2019-11-29 17:05:15

You specified the antfile attribute, so ANT was expecting to a single build.xml file.


The subant documentation describes how you can use a fileset as child parameter.

Here's an example:

<project name="Subant demo" default="run-debug-target">
    <target name="run-debug-target">
        <subant target="debug">
            <fileset dir="." includes="**/build.xml" excludes="build.xml"/>
        </subant>
    </target>
</project>

Update

Alternatively a filelist could be used:

<project name="Dry run" default="run">
    <target name="run">
        <subant target="test">
            <filelist dir="projects" files="one/build.xml,two/build.xml,three/build.xml,four/build.xml"/>
        </subant>
    </target>
</project>

Processing the following build files:

  • projects/one/build.xml
  • projects/two/build.xml
  • projects/three/build.xml
  • projects/four/build.xml

Is it possible to run the target in the all the build files concurrently ?

E.g.

<project name="Dry run" default="run">
    <target name="run">
        <subant target="test">
            <filelist dir="projects" files="one/build.xml,two/build.xml,three/build.xml,four/build.xml"/>
        </subant>
    </target>
</project>

In this example, is there any way to run target "test" present in all the build files (one/build.xml,two/build.xml,three/build.xml,four/build.xml) concurrently ?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!