Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Last active October 21, 2020 23:58
Show Gist options
  • Save ikwattro/80e5b77efb237d947771 to your computer and use it in GitHub Desktop.
Save ikwattro/80e5b77efb237d947771 to your computer and use it in GitHub Desktop.
OS X Downgrade to Ant 1.9.3

Downgrade to Ant 1.9.3 with brew on OSX

Related to issue for building the Neo4j Koans jimwebber/neo4j-tutorial#33 Unable to downlaod Neo4j due to a bug with the Compress lib in Ant 1.9.4. https://issues.apache.org/bugzilla/show_bug.cgi?id=56641

Remove previous ant versions

brew unlink ant
rm -rf /usr/local/Cellar/ant

Checkout to the 1.9.3 version commit for the Formula

git checkout 79b2536 /usr/local/Library/Formula/ant.rb

Edit the formula to point to the archive repository of Apache Ant :

brew edit ant

And change the url and sha lines with this :

url 'http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.3-bin.tar.gz'
sha1 '11a0b936fba02f96b8d737d90c610382232ffea6'

Install Ant

brew install ant

Done !

@RogerSangheeGold
Copy link

Perfect. I like it.

@joonseolee
Copy link

joonseolee commented Oct 21, 2020

is it still working?
it doesn't work for me :(

⋊> ~ brew install ant                                                                               08:55:48
Error: No available formula or cask with the name "ant".
==> Searching for similarly named formulae...
These similarly named formulae were found:
ant                   antlr                 dante                 libantlr3c            pngquant
ant-contrib           antlr4-cpp-runtime    enchant               libimagequant         quantlib
[email protected]               antlr@2               fantom                libquantum            smartypants
antibody              anttweakbar           geant4                manticoresearch       tarantool
antigen               atlantis              homeassistant-cli     octant                vagrant-completion
antiword              ctags-exuberant       howard-hinnant-date   plantuml
To install one of them, run (for example):
  brew install ant
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment