Java Reference
In-Depth Information
Installing Maven
Besides graphical tools, you are strongly encouraged to learn about Maven, the popular
build and release management tool. By using Maven, you will enjoy the following things:
• A standard structure for all your projects
• A centralized and automatic management of dependencies
Maven is distributed in several formats, for your convenience, and can be downloaded
from .
Once the download is complete, unzip the distribution archive (for example, apache- for Windows) to the directory in which you wish to install
Maven 3.1.0 (or the latest available version), for example, C:\\Programs\apache-
maven-3.1.1 . Some operating systems such as Linux or OS X offer Maven packages in
their application repositories.
Once done, add the M2_HOME environment variable to your system so that it will point to
the folder where Maven has been unpacked.
Next, update the PATH environment variable by adding the Maven binaries to your system
path. For example, on the Windows platform, you should include %M2_HOME%/bin in or-
der to make Maven available on the command line.
Some additional Maven learning materials are available on the Sonatype website in the
form of free topics; refer to .
Testing the installation
Once you have completed your installation, run the mvn version to verify that Maven has
been correctly installed. Refer to the following code snippet to verify the correct installa-
> mvn -version
Apache Maven 3.1.1
(0728685237757ffbf44136acec0402957f723d9a; 2013-09-17
Maven home: C:\Programs\Dev\apache-maven-3.1.1
Java version: 1.8.0_11, vendor: Oracle Corporation
Search WWH ::

Custom Search