Installing Maven

After few years of not needing it, I came back to Maven, reason being that I cannot use Gradle for reasons beyond my control and Ant does not describe complex projects structures required.


Getting new version of Maven


$ brew install maven
==> Downloading ....
/usr/local/Cellar/maven/3.2.3:
$ mvn -version

Apache Maven 3.2.3
$ which mvn
/usr/local/bin/mvn


Setting M2_HOME


$ echo $M2_HOME
# nada


I added the following in my ~/.profile




# Maven - updated: Oct 20, 2014
export MAVEN_HOME=/usr/local/Cellar/maven/3.2.3/
export PATH=${PATH}:${MAVEN_HOME}/bin
export M2_HOME=/usr/local/Cellar/maven/3.2.3/
export PATH=${PATH}:${M2_HOME}/libexec


and run:

$ echo $M2_HOME
/usr/local/Cellar/maven/3.2.3/



As an Amazon Associate I earn from qualifying purchases.

No comments:

Post a Comment

Please be polite.

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Posts

Most Popular Articles