A.2. Install Maven
The following software must be installed:
- An archiving tool for extracting the contents of compressed files.
Procedure A.1. Install Maven
- Enter http://maven.apache.org/download.cgi in the address bar of a browser.
apache-maven-3.0.5ZIP file and save it to your hard drive.
Install and configure Maven.
On Red Hat Enterprise Linux
- Extract the ZIP archive to the directory where you wish to install Maven.
- Open a terminal.
- Add the M2_HOME environment variable by entering the following command:
- Add the M2 environment variable by entering the following command:
- Add the M2 environment variable to your path by entering the following command:
- Make sure that JAVA_HOME is set to the location of your JDK. For example:
- Make sure that $JAVA_HOME/bin is in your PATH environment variable.
- Run the following command to verify that Maven is installed successfully on your machine:
On Microsoft Windows
- Extract the ZIP archive to the directory where you wish to install Maven. The subdirectory
apache-maven-3.0.xis created from the archive.
- Press Start+Pause|Break. The System Properties dialog box is displayed.
- Click the Advanced tab and click Environment Variables.
- Under System Variables, select Path.
- Click Edit and add the two Maven paths using a semicolon to separate each entry.
- Add the M2_HOME variable and set the path to
C:\Program Files\Apache Software Foundation\apache-maven-3.0.X.
- Add the M2 variable and set the value to %M2_HOME%\bin.
- Update or create the Path environment variable:
- Add the %M2% variable to allow Maven to be executed from the command line.
- Add the variable %JAVA_HOME%\bin to set the path to the correct Java installation.
- Click OK to close all the dialog boxes including the System Properties dialog box.
- Open Windows command prompt and run the following command to verify that Maven is installed successfully on your machine:
Maven is successfully installed and configured on your machine.