在idea命令行中mvn clean install命令时,报The goal you specified requires a project to execute but there is no POM
D:\xxx>mvn clean install
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.096 s
[INFO] Finished at: 2022-1-26T19:09:42+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\xxx). Please verify you invoked Maven from the correct directory. -> [Help 1]
发现我自己多加了一层目录,因此pom文件不在工程目录中,删除一层目录,再运行,就成功了