Error running ’ [org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate]’: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.
No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.
今天在使用骨架创建web项目的时候,出现这个错误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项目的时候,进行spring学习并没用出现问题。但在使用骨架创建webapp的时候出现了。最后发现我的maven项目的详细位置是D:/java/apache-maven-3.8.1-bin/apache-maven-3.8.1,而我最初的配置是D:/java/apache-maven-3.8.1-bin,可能是多一级目录的问题吧,暂时留个坑。这里的解决方案就是配置到详情目录。