Installing Maven
Contents
Installation of Apache Maven is extremely straightforward. Just run the following command to install the latest Apache Maven:
$ sudo apt-get update $ sudo apt-get install maven
In order to verify the installation enter the following command and check its output:
$ mvn -version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_77, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-15-generic", arch: "amd64", family: "unix"
If you see this or a similar output, Apache Maven is installed successfully.
For completeness sake, Maven is installed in /usr/share/maven
. Maven’s configuration files are located under /etc/maven
.