zondag 30 december 2007

Installing Maven 2

In this tutorial you will install Apache Maven 2.

Prerequisites


Make sure you have Java installed. To check if it's installed correctly, open a command prompt and give the command:
java -version
(If you have a version lower than 1.5, this might be a good moment to get the upgrade, here: http://java.sun.com/)

Download Maven 2


To install Maven 2, download the distribution from here:
http://maven.apache.org/download.html.
Windows users, download the zipped binary, e.g.: apache-maven-2.0.8-bin.zip

Unzip to installation folder


Unzip the package to a folder where you want the install to go, e.g:
C:\Program Files\Apache Group\Maven\apache-maven-2.0.8\

Set environment variables


Browse into the bin directory and copy the folder address.
Edit the PATH environment variable, make it include the path to the Maven 2 bin directory, e.g.:
PATH=C:\Program Files\Apache Group\Maven\apache-maven-2.0.8\bin;%PATH%.

Windows users: Start -> Settings -> Control Panel -> System, tab Advanced, button 'Environment Variables'.
Select the PATH environment variable under System and edit it, or if you don't
have those permissions, edit existing or create new variable PATH under User
environment variables.

Optionally, create an M2_REPO environment variable pointing to your local
repository. This is convenient for external tools. Also check out this
tip on how to set the location of your local maven 2 repository.

That's it!


To check if install is succesfull, open a command prompt and type:
mvn -version
This should output your currently installed Maven version.

More resources


http://www.gorerle.com/vlab-wiki/index.php?title=Maven2_Installation