如何运行使用Ant南特的任务? [英] How to run a Nant task with Ant?

查看:143
本文介绍了如何运行使用Ant南特的任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望做的东西,似乎是可行的,但在谷歌搜索不返回的东西作为precise因为我需要什么。

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

我们继承了从previous公司,本地化网站南特脚本。他们的工作太棒了。

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

我们有我们的比较两个SVN仓库自己的Ant脚本,然后将它们合并。我们想调用脚本南特,而Ant脚本中运行。

We have 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.

谢谢!

推荐答案

您打电话把你的Ant脚本在批处理文件(ant_tasks.bat),然后使用EXEC从恶性执行它。结果
这样的事情:

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>

文档

或者你可以把你的恶性脚本,批处理文件,然后从蚂蚁使用EXEC执行它。

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

例如:

<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>

文档

这篇关于如何运行使用Ant南特的任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆