开发者

How to run a Nant task with Ant?

I am looking to do something that seems feasible, but searches on Google do not return something as precise as what I need.

We inherited Nant scripts from a previous company that localizes websites. They work great.

We have开发者_Go百科 our own Ant scripts that compare two SVN repositories and then merge them. We would like to call the Nant script while the Ant scripts are run.

Anybody can provide some guidance as of how to do that? We are not looking to rewrite the Nant script in Ant, so please avoid that suggestion.

Thanks!


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜