Install Maven

Download the stable version of maven (1.0.2) from http://maven.apache.org/maven-1.x/start/download.html.

Before installing maven you must have already installed Java 1.5.

The version of Maven should be 1.0.2. The 1.1.x series has been found to be buggy. And the 2 release is incompatible with 1.x.

Install Maven by double-clicking on the downloaded file which should be called maven-1.0.2.exe.
 
If JAVA_HOME is not set, an error will occur.

You can set the path to Java home from the Start -> Settings -> Control Panel -> System menu.

Click on the Advanced tab and then click the Environment Variables button.

Click "New" to add a new variable.

Environment Variable Menu

After installation, also set the MAVEN_HOME variable to point to the base installation area.

My installation dir is C:\work\maven.

Click on the "New" button under the "System Variables" box.

Copy the value from the Explorer bar into the new variable.

You will also have to add the bin directory of the maven installation to your PATH environment variable:

Now, you should be able to use maven from the command line.

Symlinking the Cache Directory

On Unix, Maven will download many external jars to your home directory. This can be a problem if you have limited disk space. The easiest way to get around this problem is creating a symlink from an area where you have more space.

cd /scratch/
mkdir .maven
cd ~
ln -s /scratch/.maven

Now the location on the scratch disk will hold the Maven downloads rather than the home directory.

Development tips for the Maven tool.

 

  • No labels