Friday, May 28, 2010

Title: How to upgrade maven in macosx?

See this at Nabble

In mac, maven is laid out as below

ashee-mac:~ amitava$ which mvn
ashee-mac:~ amitava$ ls -l `which mvn`
lrwxr-xr-x 1 root wheel 24 May 25 09:55 /usr/bin/mvn -> /usr/share/maven/bin/mvn
ashee-mac:~ amitava$ ls -l /usr/share/maven
lrwxr-xr-x 1 root wheel 23 May 28 12:14 /usr/share/maven -> java/maven-2.2.0

So, all I needed is to download the latest version from apache, untar it under /usr/share/java
and update the symlink

ashee-mac:~ amitava$ unlink /usr/share/maven
ashee-mac:~ amitava$ ln -s /usr/share/java/apache-maven-2.2.1 /usr/share/maven

ashee-mac:~ amitava$ mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_20
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"

1 comment:

Mathieu said...

Very helpful. Tks a lot.