首页 > 代码库 > maven安装报错

maven安装报错

今天在安装maven时安照说明配置环境变量,通过命令检查:

mvn -v

竟然出现以下错误,很郁闷的是我明明配置了JAVA_HOME,并且别的依赖java的东西都能用,通过java -version也可以得到配置的java home信息,却出现以下的:

ERROR: JAVA_HOME is set to an invalid directory.
JAVA_HOME = D:\jdk1.5.0_15;
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation

 

经过反复试,最终当在环境变量中JAVA_HOME = D:\jdk1.5.0_15    后面不要加; ---这个分号,问题解决了。就是这个分号惹的祸;配置好后再执行得到如下:

C:\Documents and Settings\Administrator>mvn -v
Maven version: 2.0.9
Java version: 1.5.0_15
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

 

maven "Generating project in Batch mode"问题的解决

http://www.cnblogs.com/wardensky/p/4513372.html

maven安装报错