利用Eclipse在蚂蚁EXEC标记。我如何延长路径? [英] Using exec tag in Ant from Eclipse. How do I extend the PATH?

查看:133
本文介绍了利用Eclipse在蚂蚁EXEC标记。我如何延长路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给exec蚂蚁git的描述从内蚀。我已经在里面我的目标之一以下内容:

I am trying to exec git describe in ant from inside eclipse. I have the following inside one of my targets:

<exec  executable="git" outputproperty="git-desc">
    <arg value="describe"/>
</exec>

当我尝试正确此命令行,蚂蚁运行,因为它使用Path通过我的壳设置。当我尝试从Eclipse中运行蚂蚁,我得到以下错误:

When I try this from command line, ant runs properly as it uses the PATH set by my shell. When I try to run ant from eclipse, I get the following error:

Cannot run program "git": error=2, No such file or directory

这似乎pretty清楚,我需要更新Eclipse是给出的路径。我怎么会去这样做?

It seems pretty clear that I need to update the PATH that eclipse is given. How do I go about doing this?

推荐答案

其实我想通这一个我自己。你必须设置PATH环境变量在Eclipse中的蚂蚁。

I actually figured this one out on my own. You have to set the PATH environment variable for ant in eclipse.

第1步:进入运行 - >外部工具 - >外部工具配置...

Step 1: Go to Run->External Tools->External Tools Configurations...

第二步:选择要运行正试图执行一个命令行程序Ant文件

Step 2: Select the ant file you want to run that is trying to execute a command line program

第三步:单击环境选项卡

Step 3: Click the Environment tab

第4步:单击新建按钮,添加一个新的变量

Step 4: Click the New button to add a new variable

第五步:创建一个PATH变量命名,并在您希望通过分隔的路径进入:

Step 5: Create a variable named PATH and enter in the paths that you want delimited by :

这篇关于利用Eclipse在蚂蚁EXEC标记。我如何延长路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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