Idea +maven+java不能打包,报错如下:
No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.
解决方法:
下载maven应用,然后设置maven的环境变量。
设置maven环境变量有两种方式:
1.去intellij setting里面去设置maven位置;
2.我电脑》属性》高级里面设置maven环境变量
新建系统变量M2_HOME=maven安装路径
path添加%M2_HOME%;