How to run a Nant task with Ant?

限于喜欢 提交于 2019-12-02 07:20:58

You call put your ant scripts in a batch file (ant_tasks.bat) and then execute it from nant using exec.
Something like that:

<target name="run-command">
   <exec program="ant_tasks.bat" basedir="${test.dir}">
     <arg value="${args}" />
   </exec>
 </target>

Docs

Or you can put your nant scripts in a batch file and then execute it from ant using exec.

Example:

<existing ant task>

<target name="help">
  <exec executable="cmd">
    <arg value="/c"/>
    <arg value="nant-scripts.bat"/>
    <arg value="-p"/>
  </exec>
</target>

<another existing ant task>

Docs

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