Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install specific version of maven in mac using brew command

Tags:

I want to install specific version (3.0.5) of maven in my using brew command. I tried the following command which is failed with Error: No available formula with the name "3.0.5"

brew install maven 3.0.5 

Any ideas?

like image 338
user1614862 Avatar asked Jun 02 '16 09:06

user1614862


People also ask

Where does brew install Maven in Mac?

This is installation guide on How to install Maven in Mac OSX using Home Brew and from Mac's Command Line Terminal. Some of the Mac OS X versions comes with Maven 3 built in, installation located at /usr/share/maven .

How do I install Maven on my Macbook Pro?

2.1) Download Maven for Mac OSGo to the Maven Download site: https://maven.apache.org/download.cgi Download the “Binary tar. gz archive” file as shown in the below image. After downloading, extract it using the below command. The binaries will be extracted in the “apache-maven-3.6.

How do I find Maven version on Mac?

Once Maven is installed, you can check the version by running mvn -v from the command-line.


2 Answers

brew search maven 

lists all maven versions as below

maven maven-completion maven-shell [email protected] [email protected] [email protected][email protected]

brew install [email protected] 

Installs maven 3.0.5 on my mac.

like image 165
deepak4bin Avatar answered Sep 19 '22 05:09

deepak4bin


brew install https://raw.github.com/Homebrew/homebrew-versions/master/maven30.rb 

it will then use a different Homebrew's formular which will give you the maven 3.0.5 instead

I tried this last on my Mac and it works installing the 3.0.5!

If none works and you can use similar version try the below:

brew install maven30 

What OS do you have? On OS X 10.9 you should use brew install maven30 since maven 3.1.1 seems to be buggy.

By the way:

Using Homebrew:

you@host:~$ brew install maven will install Maven 3.3.1 (3/24/15) you@host:~$ brew install maven30 will install Maven 3.0 which should be  

better

If you got a 404 error, try doing a brew update just before.

If always nothing, try to recover the installation:

cd ~/Documents mkdir BrewRecovery cd BrewRecovery curl -OL https://gist.githubusercontent.com/ilovezfs/21a741a78927a17b9ad1/raw/fef5866ccd51f07a9635fcb1096e8df0479af01b/Brewfile-deanchester.brewfile md5 Brewfile-deanchester.brewfile 
like image 23
ivoruJavaBoy Avatar answered Sep 19 '22 05:09

ivoruJavaBoy