WorryFree Computers   »   [go: up one dir, main page]

Installing Apache Maven

The installation of Apache Maven is a simple process of extracting the archive and adding the bin directory with the mvn command to the PATH.

Detailed steps are:

  • Have a JDK installation on your system. Either set the JAVA_HOME environment variable pointing to your JDK installation or have the java executable on your PATH.

  • Extract distribution archive in any directory

unzip apache-maven-3.9.7-bin.zip

or

tar xzvf apache-maven-3.9.7-bin.tar.gz

Alternatively use your preferred archive extraction tool.

  • Add the bin directory of the created directory apache-maven-3.9.7 to the PATH environment variable

  • Confirm with mvn -v in a new shell. The result should look similar to

Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0)
Maven home: /opt/apache-maven-3.9.7
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"