Ant 构建工具安装无法正常工作! [英] Ant build tool installation not working properly!
问题描述
我已经从 Ant 网站下载了 Ant 发行版.apache-ant-1.7.0并设置指定 Ant 安装位置的环境变量ANT_HOME = C:\portal\apache-ant-1.7.0
i have downloaded the Ant distribution from the Ant web site. apache-ant-1.7.0 and set environment variable specifying the location of the Ant installationas ANT_HOME = C:\portal\apache-ant-1.7.0
PATH=;%ANT_HOME%\bin
PATH=;%ANT_HOME%\bin
但是 ant 没有正确安装
But ant is not getting properly installed
推荐答案
最好使用批处理或 shell 脚本来启动您的 ant 文件,例如=
Better use batch or shell scripts to start your ant files, f.e. =
窗口
set JAVA_HOME=C:\java\jdk\1.6.0_xx
set ANT_HOME=C:\ant
set ANT_ARGS=-lib C:\ant_xtralibs;C:\ant_testlibs
set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\cvsnt
:: default
call ant -f %1
:: debug
::call ant -debug -f %1
...
unix - 不要忘记 ANT_ARGS 行上的引号!
unix - don't forget the quotationmarks on the ANT_ARGS line !
...
ANT_ARGS="-lib /usr/local/ant_xtralibs:/usr/local/ant_testlibs"
export ANT_ARGS
...
像这样启动蚂蚁的一些优点:
Some advantages of starting ant like that :
ANT_ARGS 是一个特殊的环境变量.它的内容是自动添加到 ant 的调用中.
ANT_ARGS is a special environment variable. Its content is automatically added to the invocation of ant.
您可以在没有管理员权限的机器上使用自己的 ant 设置
you may use your own ant settings on a machine where you have no admin rights
这篇关于Ant 构建工具安装无法正常工作!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!