No valid Maven installation found. Either set the home directory in the configuration dialog or set

IDEA 导入maven项目,报错No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.。

clean和import就会报错。

原因:

IDEA的maven地址设置出错,系统找不到指定的maven路径

解决:

setting---->maven修改正确的maven链接地址。比如我的maven包放在D:/java/下。仓库地址也要设置。

No valid Maven installation found. Either set the home directory in the configuration dialog or set_第1张图片

设置完成后,点击apply和ok重新构建项目即可。

你可能感兴趣的:(IT相关,学习总结)