Home > AI > Backend > SpringBoot >

(error) mvn command is not found

Step 1: install the Apache maven on Mac

  1. download the maven file from http://maven.apache.org/download.cgi
  2. $tar xvf apache-maven-3.8.1-bin.tar.gz
  3. copy the apache folder to desired place $cp -R apache-maven-3.5.4 /usr/local
  4. go to apache directory $cd /usr/local/apache-maven-3.8.1/
  5. create .bash_profile $vim ~/.bash_profile
  6. write these two command : 
  7. export M2_HOME=/usr/local/apache-maven-3.8.1
  8. export PATH=$PATH:$M2_HOME/bin 
  9. save and quit the vim :wq!
  10. activate bash file source ~/.bash_profile
  11. restart the terminal and type mvn -version

Leave a Reply