蚂蚁无法找到在Windows路径中的可执行文件 [英] Ant can't find a executable in the Windows path

查看:273
本文介绍了蚂蚁无法找到在Windows路径中的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Ant目标:

I got a simple ant target :

<target name="doxygen">
    <exec executable="doxygen" dir="${basedir}/doxygen">
        <arg value="Doxyfile" />
    </exec>
</target>

我在Windows 7中。
当我尝试在Windows控制台的同一命令行(的doxygen的Doxyfile ),它完美的作品。 doxygen的可执行文件可以通过找到,因为我在PATH环境变量中添加的良好路径。

I'm on Windows Seven. When i try the same command line ( doxygen Doxyfile ) in the Windows console, it works perfectly. The doxygen executable can by found because i added the good path in my PATH environment variable.

但ANT中庸之道找不到doxygen的可执行文件,我得到了以下错误:

But ANT juste can't find the doxygen executable and i get the following error :

build.xml:83: Execute failed: java.io.IOException: Cannot run program "doxygen.exe" : CreateProcess error=2

我怎样才能让ANT使用Windows PATH环境变量?

How can i make ANT to use the Windows PATH environment variable ?

我已经试过了搜索路径属性,但我不工作。

I already tried the searchpath property, but i don't works.

推荐答案

您想寻找到的Doxygen目前您的系统上安装。然后进行与该值的属性,所以它可以通过安装doxygen的其他地方的人被覆盖。

You want to find where Doxygen is currently installed on your system. Then make a property with that value, so it can be overridden by people that installed doxygen somewhere else.

<property name="doxygen.path" location="C:\Program Files\Doxygen"/>

<target name="doxygen">
    <exec executable="${doxygen.path}/doxygen" dir="${basedir}/doxygen">
        <arg value="Doxyfile" />
    </exec>
</target>

这篇关于蚂蚁无法找到在Windows路径中的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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