That’s it we have successfully installed maven in linux and configured maven in linux machine. Java version: 11.0.2, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-11-openjdk-amd64ĭefault locale: en, platform encoding: UTF-8 Maven home: /opt/maven/apache-maven-3.6.0 it will show you maven version and path of m2_home. Verfy maven version with mvn -version command. To apply changes immediately in your current shell use bellow comand source /etc/environment verify maven version All commands are listed in this post - http. Maven is build tool primary for Java projects. Configure JAVAHOME environment variable: Open the /etc/environment file: sudo nano /etc/environment source.
#How to install maven in ubuntu 14.04 install
Install OpenJDK 7: sudo apt-get install icedtea-7-plugin openjdk-7-jre openjdk-7-jdk Check the installed java.
#How to install maven in ubuntu 14.04 how to
Save the file and then reload it or do logout and login again or reboot the system. In this video I am going to show How to install Maven on Windows. Install and configure JAVA + MAVEN in Ubuntu 14.04 1. In M2_HOME varible add path up to the maven directory like /opt/maven/apache-maven-3.6.0 In PATH varible add path upto maven bin like /opt/maven/apache-maven-3.6.0/bin Same as java variables add maven variables in this file. To configure maven in linux we have to add environment variables in /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-11-openjdk-amd64/bin:/opt/maven/apache-maven-3.6.0/bin" Now we have successfully download and extracted maven in /opt/maven directory devops maniprabu-10-0-0-30:~$ ls /opt/maven/ after installing wget in your system download maven using wget command. Sudo yum install wget -y for centos/rhel systems. Sudo apt-get install wget -y for debian/ubuntu systems install apache maven in linux Download Maven:īy using wget command we can download maven from official Apache maven website. That’s it we have successfully configured java jdk in our linux machine.Ībove configuration is not same in all machines.
In PATH variable add up to jdk bin path, to append a path in PATH varible we use colon(:) and path upto jdk So this is the JAVA_HOME path varible value. In my syetm jdk is located in /usr/lib/jvm/java-11-openjdk-amd64/.
You can see here at the end of the line i appended /usr/lib/jvm/java-11-openjdk-amd64/bin to PATH variable and added JAVA_HOME variable. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-11-openjdk-amd64/bin"