开发者

Calling multiple ant targets from ant

From my main build file, I would like to call the same target i开发者_如何学Pythonn multiple other build files. My current solution is to call them separately, like so:

<ant antfile="${lib_src_dir}/mylib1/build.xml" target="build" inheritAll="false"/>
<ant antfile="${lib_src_dir}/mylib2/build.xml" target="build" inheritAll="false"/>

I would like my build file to just call the build target on the build files in all of the subdirectories of ${lib_src_dir}. I know I could use the foreach tasks from ant-contrib, but I'd like to stay away from an external library if possible.

I've tried the following, which didn't work:

<ant antfile="${lib_src_dir}/*/build.xml" target="build" inheritAll="false"/>


You want the subant task.


Here's what I ended up with, using the subant task:

<subant target="clean">
    <fileset dir="${lib_src_dir}" includes="*/build.xml" />
</subant>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜