I have tried same like below but getting same message.

wget http://mirrors.estointernet.in/apache/maven/maven-3/3.6.0/source/apache-maven-3.6.0-src.zip # from https://maven.apache.org/download.cgi
unzip apache-maven-3.6.0-src.zip
vi .bash_profile
export JAVA_HOME=/opt/soft/jdk1.8.0_192
export M2_HOME

After that I have executed :

source .bash_profile
mvn --version

I get the following error:

bash: mvn: command not found

It seems you downloaded a source archive (see the "-src" in the filename) that does not contain the binary you are trying to run. Try downloading and unpacking a binary archive (with "-bin" in the filename) instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.