Skip to content

Setup: Installing Maven

rstauffe edited this page Jun 12, 2013 · 4 revisions

Installing Maven

Linux

Most Linux distributions should have maven as a package in their repositories. For Ubuntu, the terminal command is:

sudo apt-get install maven

Windows

For a Windows installation of Maven, see here for prerequisites needed to run Maven. The main prerequisite is the Java SDK, which is available here. The most recent version is recommended.

This SDK uses Maven 3. It is recommended that you install the most recent stable release, such as Maven 3.0.5. Unless you are planning on modifying the functions of Maven itself, you should download the binary zip file and extract it into a separate folder using a ZIP file archiver such as 7-Zip. The recommended location to place Maven is C:\Program Files\Apache Software Foundation\apache-maven-3.0.5.

NOTE: The C:\Program Files path is often protected from outside modification, such as extracting ZIP archives. To avoid extraction failure, extract the archive to another folder such as C:\Downloads, and move the extracted files to your desired location.

Once the bin is extracted, ensure that Maven is included in your system's PATH variable by navigating to (in Windows 7) Control Panel -> System -> Advanced system settings -> Environment Variables. Edit the PATH user variable to include the path to your Maven folder, i.e. C:\Program Files\Apache Software Foundation\apache-maven-3.0.5. Typing mvn -version in a command line should print your version of Maven and verify that Maven is correctly configured. If this command does not work, repeat the steps in this paragraph.

OSX

Maven should be installed by default. To check, type into a terminal:

mvn -version

This should print out some information about the particular version of Maven, if it is installed.

Clone this wiki locally