Getting Started with Maven
Maven was written to be a command line tool. So, go download the latest release and install it. To begin using Maven, you have to download and install it.
Begin here: http://maven.apache.org/download.html
I started with Maven 2.0.4. Download the binary distribution that suits your operating system, e.g. tar.gz (linux), or zip (windows). Unzip the contents to directory that is accessible to your user. My install is at /home/piratepete/Java/maven-2.0.4 . You should take a look at the directory contents. For Unix/Linux based systems a shell script is provided in the $MAVEN_HOME/bin directory called "mvn". For windows users it's "mvn.bat". Open the file up and you'll quickly see that I'm old school and referring to $MAVEN_HOME is incorrect. Maybe not incorrect but I'm going to be deprecated soon. Your environment probably should use $M2_HOME.
The reason to create a $M2_HOME is to save on typing in your $PATH line. You'll need to set $M2_HOME/bin in your path.
Environment variables are handy e.g. if you change things a lot. After you install Maven you'll need to set your path to the $MAVEN_HOME/bin directory.
For Linux in your user's profile you'll need:
For windows, under MyComputer/Properties you'll find an Advanced button. Select that you'll change the user or system parameter for Path. You might add something like this to the front of the Path statement:
Now open a terminal or cmd window. Type the following and you'll see something like: