Make sure that JAVA_HOME is set to the location of your JDK , e.g. export JAVA_HOME=/usr/java/jdk1. 5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable. Run mvn –version to verify that it is correctly installed.
Read moreHow do I fix mvn command not found?
setx MAVEN_HOME “C:\Program Files\apache-maven-3.6. 1” setx PATH “%PATH%;%MAVEN_HOME%\bin”; You can check if these are set appropriately by running the commands: java -version and mvn –version on the command prompt.
Read more