Maven Setup
Tuesday, 24 December 2013, 16:36
Tags: Maven
Setting up maven is pretty easy, it only requires a few simple steps.
- Maven is written in Java and thus needs Java to run. Install the verion of Java you would like to use. I use Java SE Development Kit because it also includes tools for developing, debugging and monitoring java applications such as Java Mission Control, JVisualVM, JConsole, ...
- Download the latest Maven version and unzip it.
- Set
JAVA_HOMEenvironment variable to the location of your Java installation. - Set
M2_HOMEenvironment variable to the location of your Maven installation. - Add the Maven bin folder to
PATHenvironment variable to be able to run themvncommand from the command line.
The following example shows the commands to execute to set the environment variables and adapt the path.
To check whether the configuration was successful mvn -v can be executed. When everything is configured correctly Maven and Java version information is printed out.