Apache Ant 1.9.6 Installation on Mac OSx - Does not run - Command not Found - macos

I downloaded and installed apache ant 1.9.6 on my Mac OSx El Capitan 10.11.3 in /usr/local/, added the path to the bash_profile, however, I am unable to make it run. I get the following message back, as opposed to the version
-bash: ant: command not found
I did a lot of stackoverflow, however, couldn't find solution to this.
This is how my /usr/local looks:
This is how my bash_profile parameters for apache ant looks:
# Apache Ant
export ANT_HOME=“/usr/local/ant”
export PATH=$PATH:$ANT_HOME/bin
Could you please give me any hint that you may have.
Thank you.

Remove the quotes when you set ANT_HOME
It should be
export ANT_HOME=/usr/local/ant
This is only tangentially related to your issue, but you may want to look into homebrew, using this package manager on my mac I simply do
brew intall ant It gets your PATH setup automatically.
It also lets you upgrade to future versions with brew upgrade ant

The detailed and easy steps of installing ant using homebrew on Mac OSX is already discussed here:
How can I install Apache Ant on Mac OS X?
I installed homebrew and I was able to successfully install ant using homebrew package.

Related

How to run jenkins with old version of Java instead the latest default one on MacOS?

I'm setting up Jenkins on my Macbook (High Sierra), seems like the default version of Java is Java 9, which causes issue "java.lang.AssertionError: InstanceIdentity is missing its singleton"
I changed the Java home of my Mac from 9.x to 8 already, but when I reinstall, same trouble still comes along.
I checked the System Properties under Manage Jenkins/System Information, the value java.specification.version still is "9".
So how can I install Jenkins with old version of Java?
Or any workaround for it?
Here is what worked for me with OS X 10.13.2 (High Sierra).
I used "brew install jenkins" to install Jenkins. You can find instructions from http://flummox-engineering.blogspot.com/2016/01/installing-jenkins-os-x-homebrew.html, for example.
Download JDK 8 from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Set your JAVA_HOME and JDK_HOME to point to the version you downloaded. (Put this is your .bash_profile if needed.)
For example,
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
export JDK_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Type in "jenkins --httpPort=9898" or whatever port is desired to start Jenkins.
If you aren't using the brew installation, you can open the start script at
/Library/Application Support/Jenkins/jenkins-runner.sh
and set your JAVA_HOME at the top of the script using the following line
export JAVA_HOME="`/usr/libexec/java_home -v 1.8`"
Then restart Jenkins and you'll be running Jenkins on 1.8

Installing Wxpython on mac

I am trying to install wxpython on mac os. I have already tried following solution. I have already enables software installation from all sources
a) Downloaded the binary for mac and tried to install it. It says no software found to install at the last step.
b) I tried using brew to install. The brew command works find but when when I tried import wx it says no module found.
Can you specify how to get rid of this error? My mac version is 10.11.5 I am using python 2.7
Try using the installer found here: https://wxpython.org/snapshots/. It is a current (as of 2 weeks ago) snapshot of the code, modified to use the newer Installer Package format.

Which version of apache ant is compatible with OS X 10.7.5?

I've had so much trouble in installing ant. I first downloaded it from the apache website, had some errors. Then I finally figured out a way to install through terminals 'brew install ant'; which it worked after downloading Xcode and configuring bash_profile.
So my question is, why does it show that the version is 1.8.2? instead of 1.9.7? Is this a compatibility issue?
This is my output
To my knowledge, All OS X versions prior to 10.9 have ANT already installed. From 10.9 and later , we need to install ANT.
Installation ANT is about extracting tar file, setting ANT_HOME variable, Setting path and setting JAVA_HOME as well.
In my view, you are already seeing an older version of ANT installed in your machine by default. However, ANT 1.8.x or 1.9.x both are pretty stable and should able to meet your build automation objectives.

Installing Bakefile in Mac osx 10.11

I have been trying to install bakefile(v0.2.9) in mac osx 10.11. Whenever I try to install bakefile using the dmg file I get The installation failed.The installer could not install the software because there was no software found to install error.
I even tried building it from the source code(v1.2.5.1 from github). I built it using the sudo make command.However sudo make install command throws No rule to make target install.
Is there any other way to install bakefile in macosx 10.11?
Edit :
Finally I managed to install the bakefile 0.2.9 in osx 10.11. I can't use the latest version as it does not supports the bakefile we have been using in our projects.
Though the installation is successful,I get the segmentation fault 11 when I try to build the bakefiles(.bkl). Some of the forums suggested that the problem could be associated with python 2.7. I followed all the steps needed to resolve the issue. But none of them helped.
I have been using python 2.7.11. How can I avoid this segmentation fault?
I advice against using the legacy 0.2.9 version.
I even tried building it from the source code(v1.2.5.1 from github).
You didn’t, that’s the problem — you tried to build a very different version, 0.2.9 != 1.2.5.1. The relation between these two branches is explained at http://bakefile.org — they are incompatible and different.
If you want to build 0.2.9 from sources, you need to download and build 0.2.9.
If you want to use the 1.x version, you can download packaged “binary” version, as explained at https://github.com/vslavik/bakefile
P.S. You don’t need to, and shouldn’t, use sudo when installing somewhere you typically have access to, such as /usr/local on OS X.

confused about macports

I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site.
I am previous working on Windows and Linux, could anyone let me know what macports is (in easy words) and what is the similar item on Windows/Linux?
thanks in avdance,
George
macports is a way of getting executables and other compiled code installed on your computer without having to work out the details of compiling/linking each apllication.
It is equivalent to a package manager under Linux and other Unicies. There is no direct equivalent under Windows.
It is just a convenient way to install a lot of *nix soft on your mac book. They are installed separately (not overwriting) from binaries/daemons/libs already installed on your mac (by default in folder /opl/local). Also they are much fresher than those installed on your mac.
For example 10.6 ships with bash 3.2, but after running sudo port install bash, you will get version 4.x (to make it your default shell add /opt/local/bin/bash to file /private/etc/shells, run chsh -s /opt/local/bin/bash and reopen terminal).
Note other os x package managers: fink and homebrew (superuser question)

Resources