我已經在我的Mac上下載了最後一個apache ant版本,但版本似乎是舊版本。 有什麼想法?Mac Apache Ant版本1.8.2而不是1.9.6
myMac:~ mauri$ brew install ant
==> Downloading https://homebrew.bintray.com/bottles/ant-1.9.7.el_capitan.bottle.tar.gz
######################################################################## 100,0%
==> Pouring ant-1.9.7.el_capitan.bottle.tar.gz
/usr/local/Cellar/ant/1.9.7: 1,611 files, 34.9M
myMac:~ mauri$
myMac:~ mauri$ ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
myMac:~ mauri$
myMac:~ mauri$ ./Downloads/apache-ant-1.9.6/bin/ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
myMac:~ mauri$ uname -a
Darwin myMac 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
這裏是相對的導出變量。
myMac:~ mauri$ export ANT_HOME=/Users/mauri/Downloads/apache-ant-1.9.6
myMac:~ mauri$ export CLASSPATH=$ANT_HOME/lib:$CLASSPATH
myMac:~ mauri$ export PATH=$ANT_HOME/bin:$PATH
myMac:~ mauri$ ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
myMac:~ mauri$ /Users/mauri/Downloads/apache-ant-1.9.6/bin/ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
myMac:~ mauri$ which ant
/Users/mauri/Downloads/apache-ant-1.9.6/bin/ant
myMac:~ mauri$
這裏再多一個命令的核心任務是什麼意思?
myMac:〜馬利$螞蟻-diagnostics
------- Ant diagnostics report -------
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
-------------------------------------------
Implementation Version
-------------------------------------------
core tasks : 1.8.2 in file:/Library/Java/Extensions/selenium-html-runner-3.0.1.jar
-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
ant.java.version: 1.7
Is this the Apache Harmony VM? no
Is this the Kaffe VM? no
Is this gij/gcj? no
ant.core.lib: /Library/Java/Extensions/selenium-html-runner-3.0.1.jar
ant.home: /usr/local/Cellar/ant/1.9.7
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/local/Cellar/ant/1.9.7
No such directory.
-------------------------------------------
USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: /Users/mauri
No such directory.
我試圖卸載並從BREW再次安裝ANT,但問題還是一樣
myMac:OrgSight mauri$ brew uninstall ant
Uninstalling /usr/local/Cellar/ant/1.9.7... (1,611 files, 34.9M)
myMac:OrgSight mauri$ brew install ant
==> Downloading https://homebrew.bintray.com/bottles/ant-1.9.7.el_capitan.bottle.tar.gz
Already downloaded: /Users/mauri/Library/Caches/Homebrew/ant-1.9.7.el_capitan.bottle.tar.gz
==> Pouring ant-1.9.7.el_capitan.bottle.tar.gz
/usr/local/Cellar/ant/1.9.7: 1,611 files, 34.9M
myMac:OrgSight mauri$ which ant
/usr/local/bin/ant
myMac:OrgSight mauri$ ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
myMac:OrgSight mauri$ /usr/local/Cellar/ant/1.9.7/bin/ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
不知道,你應該仍然能夠下載特定的版本並手動安裝,我相信。 – Rao
你能發佈的'這ant'and'釀造環節輸出-v ant' – Tim
'myMac:〜馬利$釀造鏈接-v螞蟻 提個醒G:已經鏈接:/usr/local/Cellar/ant/1.9.7 要重新鏈接:沖泡斷開鏈接螞蟻&&釀造環節螞蟻 myMac:〜馬利$該螞蟻 在/ usr/local/bin目錄/ ant' @蒂姆 – Mauri