default
default

Reputation: 53

Difficulty adding Maven Apache to system PATH

I've read through multiple posts regarding this issue and can't seem to find a solution that works for my situation. I've added JAVA_HOME and MAVEN_HOME to my System Variables:

https://i.sstatic.net/Hmv8Z.jpg

From there I added them to my PATH using %JAVA_HOME%\bin and %MAVEN_HOME%\bin:

https://i.sstatic.net/jwaRT.jpg

When I run cmd as an administrator and type "mvn -version" it returns an error saying:

"'mvn' is not recognized as an internal or external command, operable program or batch file."

https://i.sstatic.net/E7dWX.jpg

I've tried different methods suggested by users and nothing has led to solution. Any advice would be appreciated. I'm also running Windows 10.

Upvotes: 1

Views: 1120

Answers (1)

RLD
RLD

Reputation: 2005

Seems you have installed the wrong version of Apache Maven.

  1. Install the binary version for Windows from here.
  2. Then do the steps as you have done previously to set PATH and run Maven.
  3. Ensure you open a new Command Prompt Window after setting PATH and running Maven.

Upvotes: 1

Related Questions