maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailman <>
Subject 'mvn' is not recognizedas an internal or external command
Date Wed, 07 Sep 2011 16:57:21 GMT
I have only found this
reference  and other similar references via Google. Tried all suggestions,
and have isolated the issue down the issue I'm having now.

I'm setting up on a Windows XP VM.

I have the Java SDK, and Mvn installed in "C:\Software" folder to eliminate
spaces in the path.

I have my environment variables set up as follows:

M2 = %M2_HOME%\bin
M2_HOME = C:\Software\apache-maven-3.0.3

Based on the resources I've searched, I'm not using these in my "Path"
environment var in favor of using  literal paths to avoid misinterpretation.

Path = *C:\Software\Java\jdk1.7.0\bin; C:\Software\apache-maven-3.0.3\bin*;
%SystemRoot%\system32; %SystemRoot%;%SystemRoot%\System32\Wbem; 

The problem is this:
I can execute my Java compile command as per the Maven install instructions:
java -cp target/my-app-1.0-SNAPSHOT.jar
and get my expected "Hello World"

But I cannot execute my mvn version command:
mvn --version

But.....if I reverse the two paths to the following:
Path = *C:\Software\apache-maven-3.0.3\bin; C:\Software\Java\jdk1.7.0\bin;*
%SystemRoot%\system32; %SystemRoot%;%SystemRoot%\System32\Wbem;

I can then execute my 'mvn --version' command, but then get the same error
for Java:
'java' is not recognizedas an internal or external command

Anyone have any clue what's going on here? Thanks!

View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message