Maven, has been my project build centric tool for many years now. I have never really had an issue updating to the latest version on Windows, Linux or Unix environments, but every-time I update Mac, I tend to forget the subtleties in the process, so I thought I would blog my findings.
Latest: http://maven.apache.org/download.html
It will extract to a folder called maven-2.x.x (ie maven-2.2.0)
3. Open Terminal and issue the following commands:
sudo mv ~/Desktop/maven-2.2.0 /usr/share
NOTE: If you cannot use sudo because of local restrictions you can install it locally, perhaps in your home directory somewhere. Just substitute the path you use in the following steps.
You now have a symlink /usr/bin/mvn -> /usr/share/maven-2.2.0/bin/mvn
Apache Maven 2.2.0 (r788681; 2009-06-26 06:04:01-0700)
Java version: 1.6.0_15
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: “mac os x” version: “10.5.8” arch: “x86_64” Family: “mac”
I think the reason I was originally stumped, is because I was not expecting just the binary being distributed with Mac OS X. I was actually thinking nothing would get distributed, but Maven binary gets shipped from the factory.
I also tend to put my installations under /usr/sbin/** or /usr/bin/**, but somewhere I came across /usr/share/** which is where this installation ended up. I will most likely move the installation when I upgrade next time. But for now, I have work to do…
Recent Comments