You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Cappoli, William" <wc...@firstam.com> on 2009/04/13 20:44:24 UTC

Mvn command not recognized

I have installed Maven2 as described in the steps found at:

http://maven.apache.org/download.html

I'm running an XP machine. I created the user variable and added the bin
path to the path variable. However, when I try to run the mvn --version
command to verify it is installed correctly I get the following error:

'mvn' is not recognized as an internal or external command

However, if I use the command as follows I get the expected result:

C:\>"C:\Program Files\apache-maven-2.0.9\bin\mvn" --version

Result:

Maven version: 2.0.9
Java version: 1.5.0_15
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

It is a pain to have to write out the entire path each time especially
knowing I should not have to do this. I have verified the paths and
variables are setup correctly and received this list when I ran the set
command:

M2_HOME=C:\Program Files\apache-maven-2.0.9
M2_REPO=C:\Documents and Settings\wcappoli\.m2\repository\bin
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\CA\SharedComponents\OutputManagement\;C:\Program
Files\CA\
SHARED~1\OUTPUT~1;C:\Program Files\CA\SHARED~1\CA_APPSW;C:\Program
Files\CA\Shar
edComponents\CA_APPSW\;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS
;C:\WINDOWS\System32\Wbem;c:\Program Files\ATI
Technologies\ATI.ACE\Core-Static;
C:\Program Files\Utimaco\SafeGuard Easy\;C:\Program
Files\NetManage\Windows;%JAV
A_HOME%\bin; %GROOVY_HOME%/bin; %ANT_HOME%\bin;%M2_HOME%\bin

I also get this when I check for the M2_HOME path:

C:\>echo %M2_HOME%
C:\Program Files\apache-maven-2.0.9

Anybody have any ideas as to how to fix this?

Thanks

Bill Cappoli 
Intermediate Business Systems Analyst
Roc IT 
Phone - 1-800-969-8787 ext. 6795 
Fax - 1-800-644-6262 



------------------------------------------------------------------------------
This message may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain
information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended
addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.
If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message
and any copies immediately thereafter.


==============================================================================

Re: Mvn command not recognized

Posted by Rambo <ra...@gmail.com>.
Thanks Wayne Fay

Your solution worked for me

I am using maven 3.0.3 in Windows XP SP3

I have also included the M2 variable value in PATH variable before changing
the path of Maven to a path that doesnt have any spaces.





--
View this message in context: http://maven.40175.n5.nabble.com/Mvn-command-not-recognized-tp118686p5747848.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Mvn command not recognized

Posted by santiagoloso <sa...@gmail.com>.
I've followed this thread since I'm dealing with the same problem. I've
substituted Path value for the whole M2_HOME value and it's not working.

Any other suggestions?


Cappoli, William wrote:
> 
> Chris,
> 
> Your suggestion of writing the entire path into the path variable
> worked. 
> 
> Thanks everyone 
> 
> 
> Bill Cappoli 
> Intermediate Business Systems Analyst
> Roc IT 
> Phone - 1-800-969-8787 ext. 6795 
> Fax - 1-800-644-6262 
> 
> 
> -----Original Message-----
> From: news [mailto:news@ger.gmane.org] On Behalf Of Chris Lieb
> Sent: Monday, April 13, 2009 3:18 PM
> To: users@maven.apache.org
> Subject: Re: Mvn command not recognized
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 4/13/2009 2:01 PM, Cappoli, William wrote:
>> -----Original Message-----
>>> From: Wayne Fay [mailto:waynefay@gmail.com]
>>> Sent: Monday, April 13, 2009 2:57 PM
>>> To: Maven Users List
>>> Subject: Re: Mvn command not recognized
>>> 
>>>> Anybody have any ideas as to how to fix this?
>>>>
>>> Install Maven into a path that does not have any spaces, eg c:\dev.
>>> 
>>> Wayne
>>>
>> Thanks for the suggestion however I still have to type out the whole 
>> path except I no long need the quotation marks.
>>
>>
>> Bill Cappoli
>>
> Are you restarting cmd after you set the PATH variable?  The spaces
> should not matter, as I have many spaces in paths that are in my PATH
> variable and do not have any issues.
> 
> A thought: have you tried replacing %M2_HOME% in PATH with the actual
> value of M2_HOME?  I think I remember running into an instance where
> Windows didn't do the substitution in the PATH variable.
> 
> Chris Lieb
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iQEcBAEBAgAGBQJJ45ACAAoJEJWxx7fgsD+CdU0H/2efhrLqaCJrBinSLgkw+62W
> bN/tAnuyYr8Fbkm7ds/g/IavKCHT1kZrL57Q/67vtEB8ggLPHJlvil16vSoz4Nt2
> kwvTVAPls4FgttQx9dyGDDNZjy1Yqb/8ToNGPhW4NA8tiawkZ3q5EVRqxdvN+rla
> LDY99o9WuG9ew6iiXK9oAuUt2zJa0YslVPdd+4nILLuWa4xitc5HFNJjTnNx1zLo
> zg85b6GsxIx9fvPwclRDrmEeTvMkb/UkjphTJMgOO4B5uPO4kdpcEPitamDf5Vva
> f3gZIf8UIuyHvsesAYqH6xKDRD5eKkJNdVYfUeson5sDJQFymunLeImv8aMkIc0=
> =RcJQ
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> ------------------------------------------------------------------------------
> This message may contain confidential or proprietary information intended
> only for the use of the addressee(s) named above or may contain
> information that is legally privileged. If you are not the intended
> addressee, or the person responsible for delivering it to the intended
> addressee, you are hereby notified that reading, disseminating,
> distributing or copying this message is strictly prohibited.
> If you have received this message by mistake, please immediately notify us
> by replying to the message and delete the original message
> and any copies immediately thereafter.
> 
> 
> ==============================================================================
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mvn-command-not-recognized-tp23026786p23060159.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Mvn command not recognized

Posted by "Cappoli, William" <wc...@firstam.com>.
Chris,

Your suggestion of writing the entire path into the path variable
worked. 

Thanks everyone 


Bill Cappoli 
Intermediate Business Systems Analyst
Roc IT 
Phone - 1-800-969-8787 ext. 6795 
Fax - 1-800-644-6262 


-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Chris Lieb
Sent: Monday, April 13, 2009 3:18 PM
To: users@maven.apache.org
Subject: Re: Mvn command not recognized

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/13/2009 2:01 PM, Cappoli, William wrote:
> -----Original Message-----
>> From: Wayne Fay [mailto:waynefay@gmail.com]
>> Sent: Monday, April 13, 2009 2:57 PM
>> To: Maven Users List
>> Subject: Re: Mvn command not recognized
>> 
>>> Anybody have any ideas as to how to fix this?
>>>
>> Install Maven into a path that does not have any spaces, eg c:\dev.
>> 
>> Wayne
>>
> Thanks for the suggestion however I still have to type out the whole 
> path except I no long need the quotation marks.
>
>
> Bill Cappoli
>
Are you restarting cmd after you set the PATH variable?  The spaces
should not matter, as I have many spaces in paths that are in my PATH
variable and do not have any issues.

A thought: have you tried replacing %M2_HOME% in PATH with the actual
value of M2_HOME?  I think I remember running into an instance where
Windows didn't do the substitution in the PATH variable.

Chris Lieb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJ45ACAAoJEJWxx7fgsD+CdU0H/2efhrLqaCJrBinSLgkw+62W
bN/tAnuyYr8Fbkm7ds/g/IavKCHT1kZrL57Q/67vtEB8ggLPHJlvil16vSoz4Nt2
kwvTVAPls4FgttQx9dyGDDNZjy1Yqb/8ToNGPhW4NA8tiawkZ3q5EVRqxdvN+rla
LDY99o9WuG9ew6iiXK9oAuUt2zJa0YslVPdd+4nILLuWa4xitc5HFNJjTnNx1zLo
zg85b6GsxIx9fvPwclRDrmEeTvMkb/UkjphTJMgOO4B5uPO4kdpcEPitamDf5Vva
f3gZIf8UIuyHvsesAYqH6xKDRD5eKkJNdVYfUeson5sDJQFymunLeImv8aMkIc0=
=RcJQ
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



------------------------------------------------------------------------------
This message may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain
information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended
addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.
If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message
and any copies immediately thereafter.


==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Mvn command not recognized

Posted by Chris Lieb <ch...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/13/2009 2:01 PM, Cappoli, William wrote:
> -----Original Message-----
>> From: Wayne Fay [mailto:waynefay@gmail.com] 
>> Sent: Monday, April 13, 2009 2:57 PM
>> To: Maven Users List
>> Subject: Re: Mvn command not recognized
>> 
>>> Anybody have any ideas as to how to fix this?
>>>
>> Install Maven into a path that does not have any spaces, eg c:\dev.
>> 
>> Wayne
>>
> Thanks for the suggestion however I still have to type out the whole
> path except I no long need the quotation marks.
>
>
> Bill Cappoli
>
Are you restarting cmd after you set the PATH variable?  The spaces
should not matter, as I have many spaces in paths that are in my PATH
variable and do not have any issues.

A thought: have you tried replacing %M2_HOME% in PATH with the actual
value of M2_HOME?  I think I remember running into an instance where
Windows didn't do the substitution in the PATH variable.

Chris Lieb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJ45ACAAoJEJWxx7fgsD+CdU0H/2efhrLqaCJrBinSLgkw+62W
bN/tAnuyYr8Fbkm7ds/g/IavKCHT1kZrL57Q/67vtEB8ggLPHJlvil16vSoz4Nt2
kwvTVAPls4FgttQx9dyGDDNZjy1Yqb/8ToNGPhW4NA8tiawkZ3q5EVRqxdvN+rla
LDY99o9WuG9ew6iiXK9oAuUt2zJa0YslVPdd+4nILLuWa4xitc5HFNJjTnNx1zLo
zg85b6GsxIx9fvPwclRDrmEeTvMkb/UkjphTJMgOO4B5uPO4kdpcEPitamDf5Vva
f3gZIf8UIuyHvsesAYqH6xKDRD5eKkJNdVYfUeson5sDJQFymunLeImv8aMkIc0=
=RcJQ
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Mvn command not recognized

Posted by "Cappoli, William" <wc...@firstam.com>.
Thanks for the suggestion however I still have to type out the whole
path except I no long need the quotation marks. 


Bill Cappoli 
Intermediate Business Systems Analyst
Roc IT 
Phone - 1-800-969-8787 ext. 6795 
Fax - 1-800-644-6262 


-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Monday, April 13, 2009 2:57 PM
To: Maven Users List
Subject: Re: Mvn command not recognized

> Anybody have any ideas as to how to fix this?

Install Maven into a path that does not have any spaces, eg c:\dev.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



------------------------------------------------------------------------------
This message may contain confidential or proprietary information intended only for the use of the addressee(s) named above or may contain
information that is legally privileged. If you are not the intended addressee, or the person responsible for delivering it to the intended
addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.
If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message
and any copies immediately thereafter.


==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Mvn command not recognized

Posted by Wayne Fay <wa...@gmail.com>.
> Anybody have any ideas as to how to fix this?

Install Maven into a path that does not have any spaces, eg c:\dev.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org