Introduction
Maven is a tool for building and managing Java-based projects. It is a successor to Ant, but takes a more project oriented approach. It is great for figuring out dependancies and complex build orders, and helps to give a coherent overall structure to java projects. For more on maven see what is maven?
In this section you will:
- Download and Install Maven
- Configure your Maven environment
Download
Download the binary (.bin.zip)
Install
Windows
- Unzip the program and copy to the directory where you wish it to reside (say, C:\Program Files\Maven)
Linux
- Navigate to the directory where you wish to install maven. Example: /usr/java.
- Execute the command:
[/usr/java]% unzip maven-2.0.6.zip
Configuration
Windows
(Optional) Edit your path to include the above directory. This is to avoid having to preface every program call with its full path.
Linux
Execute the following commands to update your environment (assuming you are using a bash shell).
export M2_HOME=/usr/java/maven-2.0.6 export PATH=$PATH:$M2_HOME/bin
The above commands should be added to your profile in order to persist.
It seems that the maven/binaries/maven-2.0.4.exe windows installer download doesn't exist any more. Only the .zip and .gz versions.