How to Install maven?

To Install maven,

Download zip file from

https://maven.apache.org/download.cgi and unzip the folder

/Users/admin/ → unzip and put in the location

Terminal

vi ~/.bash_profile

Set path variable

export M2_HOME=/Users/admin/apache-maven-3.8.3

export PATH=$PATH:$M2_HOME/bin

again refresh the bash using source .bash_profile

Now, check whether maven got installed

mvn - version

Response will be as below

pache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)

Maven home: /Users/admin/apache-maven-3.8.3

Java version: 16.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-16.0.1.jdk/Contents/Home

Default locale: en_GB, platform encoding: UTF-8

OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"

Comments

Popular Posts