

– When the download is completed, extract the archive in the /opt directory like below # sudo tar -xzvf /tmp/apache-maven-3.6. -C /opt – Go to the official Apache Maven download page and use the wget command to download the latest version of Apache Maven. OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) OpenJDK Runtime Environment (build 1.8.0_161-b14) – To verify that Java was successfully installed, run the following command: # java -version Use the following command to Install the OpenJDK package: # yum install java-1.8.0-openjdk Install JavaĠ1- Java Development Kit (JDK) is required to install Apache Maven. Method 2./ Installing Apache Maven From Source 1. Java version: 1.8.0_191, vendor: Oracle Corporation – To verify if Apache Maven is successfully installed just run the mvn -version command: # mvn -version Use the below command: # sudo yum install maven – The official CentOS repositories contains Maven packages that can be installed with the yum package manager. Method 1./ Installing Apache Maven using Yum You’ll need to be logged in as a user with sudo privileges in order to install the Apache Maven. In this tutorial we will show you two different ways to install Apache Maven on CentOS 7 / Rhel 7: Using the yum package manager or by a source from the official website. It simplifies the build process like ANT. It is used for projects build, dependency and documentation. Apache Maven is a powerful project management tool that is based on POM (project object model).
