问题描述
刚开始学习使用maven,按照maven官网上Maven in 5 Minutes中的步骤运行命令:
收到错误提示如下:
The goal you specified requires a project to execute but there is no POM in this directory(D:\maven-test). Please verify you invoked Maven from the correct directory
解决方法
由于本人的系统为win10,并且mvn命令是在powershell中使用mvn.cmd运行的,所以命令的选项部分应该被包含在括号里,否则powershell识别不了。改正后可以输出正常结果。