I am trying to install maven v3.5.4 onto my computer and whenever I try the 'mvn -version' command, I get
'mvn' is not recognized as an internal or external command, operable program or batch file.
I have looked up multiple tutorials on how to do this, and they are giving nearly the same information. Add system variables M2 and M2_HOME, then append a directory to the Path system variable. I have the System Variables configured to the following:
M2:
- Name: M2
- Value: C:\Program Files\Apache\maven\bin
M2_HOME:
- Name: M2_HOME
- Value: C:\Program Files\Apache\maven
MAVEN_HOME:
- Name: MAVEN_HOME
- Value: C:\Program Files\Apache\maven
Path:
- Name: Path
- Value: %M2_HOME%\bin;%JAVA_HOME%\bin
I have seen people saying that there should be a .exe or .bat file inside the bin directory. I do not have any of these. I only have 4 files inside this folder.
This could perhaps be the issue. The path to my Maven directory is:
I have the following maven related system variables:
And my Path variable is:
I'm not sure how to fix this issue so if anyone knows, please let me know.