idea开发工具导入maven的时候报了这个错误,这是什么错误
发布网友
发布时间:2022-04-30 19:33
我来回答
共2个回答
热心网友
时间:2022-05-24 02:14
maven is not a valid Maven home directory
This error message means that the folder named "maven" that you've chosen does not contain maven installation.
The default Maven Home Directory was the m2 folder.
Normally, by default you'll see either the embeded maven or the value of M2_HOME environment variable. This makes me think that maven is not configured correctly on your machine.
In command prompt, to see where M2_HOME points run: echo %M2_HOME% Then make sure that this value is either empty or points to where maven is installed. Finally, make sure maven is installed in folder different than .m2 (where actually it stores its settings).
热心网友
时间:2022-05-24 03:32
可能是你的maven目录错了。我出现过这个问题,eventlog上面显示完全一样的警告。我之前配置过一次maven,位置在settings-->build,Excution,Deployment-->Build Tools-->Maven下面,Maven home directory。我记得当时没什么问题,但是再次打开idea,【maven目录似乎变了】,因此报这个警告。再修改为正确目录就好了。那个英文答案是对的。