Then run below command to update Linux configurations source /etc/profile.d/apache-maven. sudo gedit /etc/profile.d/apache-maven.shĪdd below content to the editor (Make sure you replace your JAVA_HOME with your jdk path) export JAVA_HOME=/usr/lib/jvm/java-6-oracle The commands above update Ubuntu package index and install Apache Maven along with all dependencies, including OpenJDK. Unzip the Apache Maven download, and move the folder to a place on your computer where you keep all of your other DevOps tools. At a high level, the steps to install Maven are: Download Maven binaries from the Apache website. This command will install OpenJDK along with Maven stable version. A Maven install is one of the easier software installations you can do. Run below command with you favorite text editor. To install a stable version on Ubuntu Linux, run the commands below. Maven should now be installed on your system. Confirm the installation, and allow the process to complete. Open a terminal window, and enter the following: sudo yum install maven.
Now we have to set up environment variables for maven to work. Option 1: Install Apache Maven on CentOS with Yum. Because it is the Linux way to create an executable link ( ) The first file path should be where you extract the maven from tar.gz second path is you don't need to change. There are several ways you can install Maven on Linux. Make sure Java JDK installation 1.7 or higher OR GraalVM for Java 8 or higher installed in your system and already set JAVAHOME system path.
#How to install maven in linux how to#
Then create a link using below command sudo ln -s /home/menuka/software/apache-maven-3.2.5 /usr/bin/mvn A step by step guide on how to install Maven on Linux Ubuntu Operating Systems manually and from Command line. here apache-maven-3.0. is the file you want) Set up our prerequisites so that Maven is available to users.
There’s also a convenient Java version-precompiled in the file attached to the Maven Project. (If you are a beginner, go to binaries then download the version with tar.gz extension under version you want. What Is Linux Maven In short, the Maven Project is an object-oriented, command-line tool for building, editing, and managing Java-based software.