using ant read the build.xml ,according to the order written in <include >tag

走远了吗. 提交于 2019-12-24 23:25:05

问题


Here i want to compile/run first ExceuteLeadTest.class and then ExceuteContactTest.class by the ant ..But while exceuting it first it comipling/running ExcecuteContactTest.java/ExceuteContactTest.class

<project>
<target name="run" depends="compile">
<include name="testScript/ExceuteLeadTest.class" />
<include name="testScript/ExceuteContactTest.class" />
</target>
<project>

回答1:


In Ant you can use the sequential tag to run tasks in order. Normally Ant processes dependencies and runs each only once if they are included repeatedly in depends.

Example

<target name="run" depends="compile">
    <sequential>
        <antcall target="run1"/>
        <antcall target="run2"/>
    </sequential>
</target>

<target name="run1" depends="compile">
    <!-- however you run the 1st class -->
</target>

<target name="run2" depends="compile">
    <!-- however you run the 2nd class -->
</target>


来源:https://stackoverflow.com/questions/50202602/using-ant-read-the-build-xml-according-to-the-order-written-in-include-tag

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