I'm trying to run an ant script from my Vagrantfile, and I get this error:
==> vm: Running provisioner: host_shell...
[stderr] Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
I have java 1.8.0_161 and ant 1.8.2
and have in my .bash_profile:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
export ANT_HOME=/Users/.../ant
export PATH="$PATH:$ANT_HOME/bin"
I've looked through all other relevant posts, and can't find a solution. My situation is a little different in that I'm using ant which came in a software package I have to use for work, rather than installed with brew or downloaded from apache. I noticed the $ANT_HOME/lib folder has all .pom files instead of .jar files, which I'm guessing might be part of the problem. This is my first time using ant and have never used maven.
also here is the provisioning section of my Vagrantfile:
iiq.vm.provision :host_shell do |host_shell|
host_shell.inline = './build.sh initial-build'
end
Thanks for any help!
疑似我缺少适当的.jar文件
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.