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 Save the file and then reload it or do logout and login again or reboot the system. 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"
#How to install maven on api linux aws download#
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.
#How to install maven on api linux aws install#
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.
![how to install maven on api linux aws how to install maven on api linux aws](https://d2908q01vomqb2.cloudfront.net/0716d9708d321ffb6a00818614779e779925365c/2017/02/25/SampleStructure.png)
Click on File -> Import -> Maven -> Existing Maven Project. I will be importing to eclipse for this tutorial. Unzip the downloaded project and import the project into your IDE. Step 2: Import the project into your favorite IDE.
![how to install maven on api linux aws how to install maven on api linux aws](https://d2908q01vomqb2.cloudfront.net/fc074d501302eb2b93e2554793fcaf50b3bf7291/2020/06/17/Architecture-of-the-application.png)
In my syetm jdk is located in /usr/lib/jvm/java-11-openjdk-amd64/. &0183 &32 This will download the zipped project into your local system. 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.
![how to install maven on api linux aws how to install maven on api linux aws](https://nexnet.files.wordpress.com/2018/04/iam.png)
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"