Can you believe it, when you have Mac os-x 10.5 running, maven is pre-installed. If you are not programming java you practically do not care about it. But if you are not programming java you will not find this blog very interesting as well :-). So especially for those that like their Mac, program java and want to upgrade there maven version from 2.0.6 to for instance 2.0.8, this is what you need to do. You can find your current maven installation in he folder:

/usr/share/maven

This is a protected directory, so you’ll need some sudo commands here to do anything. I downloaded the file "apache-maven-2.0.8.zip". On my system, zip files get extracted after download. Therefore I need a "mv" command. I did keep the original files by the way. You’ll need these commands:

cd /usr/share
sudo mv maven maven206
sudo cp -R /Users/jettro/Downloads/apache-maven-2.0.8 maven

Now it is time to check, just to be sure, open a new command shell and type the following command:

mvn -version

That should result in:


jettro:~ jettro$ mvn -version
Maven version: 2.0.8
Java version: 1.5.0_13
OS name: "mac os x" version: "10.5.1" arch: "i386" Family: "unix"

Now you have maven 2.0.8 available

One final remark, if you have changed the settings.xml file, do not forget to copy this back to the new folder.

Upgrading maven on the mac
Tagged on: