Step 1 – Prerequisites
Java development kit is the primary requirement of Apache Maven. So you need to install the Java development kit (JDK) on your system. Make sure you have installed JDK, not JRE.
If you don’t have Java Development Kit installed on your system. Visit Install Java on Fedora
Step 2 – Install Apache Maven
After verifying java version on your system. Download Apache Maven from its official website or use the following command to download Apache Maven.
Now extract downloaded archive using following command.
Step 3 – Setup Environment Variables
As you have downloaded precompiled Apache Maven files on your system. Now set the environments variables by creating new file /etc/profile.d/maven.sh.
and add the following content.
Now load the environment variables in current shell using following command.
Step 4 – Check Maven Version
Apache Maven has been successfully configured on your system. Use the following command to check the version of installed Maven on your system.
Finally, remove the downloaded archive file from the system to free disk space.