Bastian
Bastian

Reputation: 1237

mvn is not recognized as an internal or external command

I followed all the tutorials and tried to use maven.

I run win 7, and downloaded maven 3.5.4.

  1. I placed the zip file under c:\Maven and extract it in that location.

  2. I navigate to Environment variables and create Variable M2, and put value %M2_HOME%\bin.

  3. I navigate to Environment variables and create Variable M2_HOME and put value C:\Maven\apache-maven-3.5.4

  4. I navigate to System variables and in Path I added %M2_HOME%\bin

  5. In System variables the variable JAVA_Home has value C:\Program Files\Java\jdk1.8.0_65

What am I missing?

[maven path][maven path]

[java path][java path]

[env variable][env variable]

[system variable ][system variable]

[java home][java home]

[echo ][command line]

[maven path][maven path]

Upvotes: 0

Views: 13343

Answers (3)

Girish J
Girish J

Reputation: 1

The same issue I faced, In your screen shot you are missing the LICENSE, NOTICE, and README.txt.

That was because you should unzip and then copy, you would have just copied without unzipping the files.

Make sure you get the LICENSE file is in the folder. That resolved this issue.

Upvotes: 0

Sreelekshmi V
Sreelekshmi V

Reputation: 151

Resolve this is creating M2_HOME & MAVEN_HOME and editing Path variable. You can refer to this link

Upvotes: 2

Rick
Rick

Reputation: 545

When using Windows, I prefer to install with chocolatey.org You can put Java, mvn, etc on your machine and forget about it. Similar to the package management system in Linux

Upvotes: 1

Related Questions