web-dev-qa-db-ja.com

Mac OS Xユキヒョウのデフォルトのantはどこにインストールされていますか?

ANT_HOMEが設定されていないので、antのホームディレクトリがどこにあるかを調べたいと思います。 OSXインストールでデフォルトでインストールされたバージョンのantを使用しています。

17
czer

パッケージの場所を見つけるには、次の手順に従ってください。

whereis ant (replace 'ant' with whatever you're looking for)

私のマシンでは、これは次のように報告します。

/usr/bin/ant

私もです:

ls -l /usr/bin/ant

私のマシンでは、これは次のように報告します。

lrwxr-xr-x  1 root  wheel  22 Nov 30 17:09 /usr/bin/ant -> /usr/share/ant/bin/ant

私もです :

ls -l /usr/share/ant 

そして取得:

lrwxr-xr-x  1 root  wheel  14 Nov 30 17:09 /usr/share/ant -> Java/ant-1.8.1

このことから、antは/usr/share/ant/Java/ant-1.8.1にインストールされていると推測できます。

65
KevinDTimm

Ant -diagnosticsを実行すると、ant.homeがどこにあるかがわかります。

$ant -diagnostics 

-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant(TM) version 1.9.2 compiled on July 8 2013
ant.Java.version: 1.6
ant.core.lib: /opt/local/share/Java/Apache-ant/lib/ant.jar
ant.home: /opt/local/share/Java/Apache-ant 
24

/ usr/binフォルダを調べてみてください..インストールされている場所がわかります。

0
harshit

システム全体でANTはまったくありませんが、NetBeans8.1または8.2を使用しています。

ステップ1: NetBeans8.2をインストールします

ステップ2: NetBeans8.2からantを適用するのも簡単です

$ "/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/bin/ant" -diagnostics
------- Ant diagnostics report -------
Apache Ant(TM) version 1.9.7 compiled on April 9 2016

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.9.7 in file:/Applications/NetBeans/NetBeans%208.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant.jar

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant(TM) version 1.9.7 compiled on April 9 2016
ant.Java.version: 1.8
Is this the Apache Harmony VM? no
Is this the Kaffe VM? no
Is this gij/gcj? no
ant.core.lib: /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant.jar
ant.home: /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant
ant-antlr.jar (11563 bytes)
ant-Apache-bcel.jar (15077 bytes)
ant-Apache-bsf.jar (9827 bytes)
ant-Apache-log4j.jar (8676 bytes)
ant-Apache-oro.jar (9805 bytes)
ant-Apache-regexp.jar (9671 bytes)
ant-Apache-resolver.jar (9748 bytes)
ant-Apache-xalan2.jar (8197 bytes)
ant-commons-logging.jar (9791 bytes)
ant-commons-net.jar (90789 bytes)
ant-jai.jar (28321 bytes)
ant-javamail.jar (13778 bytes)
ant-jdepend.jar (13826 bytes)
ant-jmf.jar (12386 bytes)
ant-jsch.jar (48991 bytes)
ant-junit.jar (117485 bytes)
ant-junit4.jar (13196 bytes)
ant-launcher.jar (18334 bytes)
ant-netrexx.jar (16279 bytes)
ant-swing.jar (13274 bytes)
ant-testutil.jar (27034 bytes)
ant.jar (2027962 bytes)

-------------------------------------------
 USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: /Users/Sun
No such directory.

-------------------------------------------
 Tasks availability
-------------------------------------------
sshexec : Missing dependency com.jcraft.jsch.Logger
scp : Missing dependency com.jcraft.jsch.Logger
sshsession : Missing dependency com.jcraft.jsch.Logger
jdepend : Missing dependency jdepend.xmlui.JDepend
A task being missing/unavailable should only matter if you are trying to use it

-------------------------------------------
 org.Apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.Apache.org/commons/

-------------------------------------------
 XML Parser information
-------------------------------------------
XML Parser : com.Sun.org.Apache.xerces.internal.jaxp.SAXParserImpl
XML Parser Location: unknown
Namespace-aware parser : com.Sun.org.Apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Namespace-aware parser Location: unknown

-------------------------------------------
 XSLT Processor information
-------------------------------------------
XSLT Processor : com.Sun.org.Apache.xalan.internal.xsltc.trax.TransformerImpl
XSLT Processor Location: unknown

-------------------------------------------
 System properties
-------------------------------------------
Java.runtime.name : Java(TM) SE Runtime Environment
Sun.boot.library.path : /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib
Java.vm.version : 25.31-b07
ant.library.dir : /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib
user.country.format : BE
gopherProxySet : false
Java.vm.vendor : Oracle Corporation
Java.vendor.url : http://Java.Oracle.com/
path.separator : :
Java.vm.name : Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg : Sun.io
user.country : US
Sun.Java.launcher : Sun_STANDARD
Sun.os.patch.level : unknown
Java.vm.specification.name : Java Virtual Machine Specification
user.dir : /Users/Sun/Desktop/Android/android-webrtc-master
Java.runtime.version : 1.8.0_31-b13
Java.awt.graphicsenv : Sun.awt.CGraphicsEnvironment
Java.endorsed.dirs : /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/endorsed
os.Arch : x86_64
Java.io.tmpdir : /var/folders/zq/zqbl2b1x43g6kq5bxmgx39880000gn/T/
line.separator : 

Java.vm.specification.vendor : Oracle Corporation
os.name : Mac OS X
ant.home : /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant
Sun.jnu.encoding : UTF-8
Java.library.path : /Users/Sun/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/Java:.
Java.specification.name : Java Platform API Specification
Java.class.version : 52.0
Sun.management.compiler : HotSpot 64-Bit Tiered Compilers
os.version : 10.11.6
http.nonProxyHosts : local|*.local|169.254/16|*.169.254/16
user.home : /Users/Sun
user.timezone : Europe/Brussels
Java.awt.printerjob : Sun.lwawt.macosx.CPrinterJob
Java.specification.version : 1.8
file.encoding : UTF-8
user.name : Sun
Java.class.path : /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-launcher.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-antlr.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-bcel.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-bsf.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-log4j.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-oro.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-regexp.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-resolver.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-Apache-xalan2.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-commons-logging.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-commons-net.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-jai.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-javamail.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-jdepend.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-jmf.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-jsch.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-junit.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-junit4.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-launcher.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-netrexx.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-swing.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant-testutil.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/lib/ant.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/lib/tools.jar
Java.vm.specification.version : 1.8
Sun.Arch.data.model : 64
Java.home : /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre
Sun.Java.command : org.Apache.tools.ant.launch.Launcher -cp  -diagnostics
Java.specification.vendor : Oracle Corporation
user.language : en
awt.toolkit : Sun.lwawt.macosx.LWCToolkit
Java.vm.info : mixed mode
Java.version : 1.8.0_31
Java.ext.dirs : /Users/Sun/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/Java
Sun.boot.class.path : /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/classes
Java.vendor : Oracle Corporation
file.separator : /
Java.vendor.url.bug : http://bugreport.Sun.com/bugreport/
Sun.cpu.endian : little
Sun.io.unicode.encoding : UnicodeBig
socksNonProxyHosts : local|*.local|169.254/16|*.169.254/16
ftp.nonProxyHosts : local|*.local|169.254/16|*.169.254/16
Sun.cpu.isalist : 

-------------------------------------------
 Temp dir
-------------------------------------------
Temp dir is /var/folders/zq/zqbl2b1x43g6kq5bxmgx39880000gn/T/
Temp dir is writeable
Temp dir alignment with system clock is -6 ms

-------------------------------------------
 Locale information
-------------------------------------------
Timezone Central European Time offset=3600000

-------------------------------------------
 Proxy information
-------------------------------------------
http.nonProxyHosts = "local|*.local|169.254/16|*.169.254/16"
ftp.nonProxyHosts = "local|*.local|169.254/16|*.169.254/16"
Java1.5+ proxy settings:
Direct connection
0
user285594