Friday, September 12, 2008

Upgrading Maven on Apple's Leopard

Today on my MacBook Pro I needed to upgrade the pre-installed Maven version 2.0.6 to the latest Maven version 2.0.9.

This gave me a good reason to install MacPorts. The took a little bit of time, especially since as a pre-requisite I also needed to install Apple's Xcode which comes along as a hefty 1GB download.

Once it was downloaded and installed, I installed MacPorts. For some reason after the MacPorts installation successfully finished, executing sudo port -v selfupdate did not work. The port command was not found... Well, it turns out that I needed to add the path to my .profile which is located in the home directory:
  • export PATH=/opt/local/bin:/opt/local/sbin:$PATH
  • export MANPATH=/opt/local/share/man:$MANPATH
That did the trick.

Lastly, all I needed to do in order to install the latest Maven version was to execute:

sudo port install maven2

Maven 2.0.9 was immediately available thereafter:

mvn -v

1 comment:

lex said...

Thanks for the post!