错误:M2_HOME设置为无效目录 [英] Error: M2_HOME is set to an invalid directory

查看:834
本文介绍了错误:M2_HOME设置为无效目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误

Error: M2_HOME is set to an invalid directory.
M2_HOME = "C:/Users/joanet/.m2/repository"
Please set the M2_HOME variable in your environment to match the
location of the Maven installation

但是C:/Users/joanet/.m2/repository是有效目录!

推荐答案

是的,您的文件夹有效,但这不是您要指向的文件夹.

Yes, your folder is valid, but this is not the folder you want to point to.

我认为它应该实际上将错误消息告诉您的位置指向您的maven安装文件夹(类似这样)

I think it should point actually where the error messages says to you, to your maven installation folder (something like this)

C:\ development \ maven \ apache-maven-3.1.0

C:\development\maven\apache-maven-3.1.0

您当前指向的是本地存储库,通常在maven的settings.xml中(在上一个url路径的conf文件夹中)进行配置.

You are currently pointing to your local repository, something which is usually configured in the settings.xml of maven (in the conf folder of the previous url route).

这篇关于错误:M2_HOME设置为无效目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆