At Tripolis we working on a 3-tier java application, using Eclipse as IDE and Maven as build manager with a team of 4 developers. Today Sam wrote blogged about token filtering in maven 1.x and I would like to share with you, how I’ve installed Maven on my new iMac at work.
We are still using the 1.0.2. release but the installation process of the newer 2.0 release it not different.
- Download Maven 1.0.2
- Unpack maven-1.0.2.tar.gz in /usr/local as super user
sudo tar xzvf maven-1.0.2.tar.gz - Add JAVA_HOME, MAVEN_HOME and MAVEN_OPTS to your environment variables.
In order to set environment variables on Mac OS X, create a .MacOSX folder in your home directory and add a file named environment.plist. The environment file uses the XML/plist format and can be edited with Apple’s Property List Editor, which is a part of the development tools. U can also use a handy tool called RCEnvironment.
touch ~/.MacOSX/environment.plist
open ~/.MacOSX/environment.plist
On my iMac at work I originally used
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
as JAVA_HOME but after some updates it stopped working, so I am using /usr now. Basically you should also be able to use
/System/Library/Frameworks/JavaVM.framework/Home/
which points to the current JavaVM.
MAVEN_HOME and MAVEN_OPTS are optional.
When you change the environment.plist settings, you will have to logout and log back in to activate them. Alternatively you can also specify the environmental settings in
~/.cshrc or ~/.tcshrc and it will be used by any tcsh shell you launch. - Add maven to your path. I did this in my .bash_login file, which now looks like this (all on one line):
export PATH="/usr/local/maven-2.0.3/bin:
/usr/local/maven-1.0.2/bin:/usr/local/bin:
/usr/local/sbin:$PATH" - Type maven -v in the terminal. If everything is working, you should see something like this:
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
In Eclipse we use the Meven IDE but if you are going to use Maven 2.x, you will probably go for the new Plug-in for Eclipse. I usually build the projects with maven on the command line.
















0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.