Maven 运行“时生成失败;mvn清洁&x201D;第一次在安装时
我是Maven的新手,第一次尝试在我的项目中使用它 我已经设置了系统变量 JAVA_HOME系统变量 M2_主系统变量 %JAVA_HOME%\bin;%M2\u HOME%\bin;到系统路径 在使用“mvn-version”的cmd提示符中,我可以看到所有相关的详细信息 但是当我运行“mvn清理”时,我得到以下错误Maven 运行“时生成失败;mvn清洁&x201D;第一次在安装时,maven,Maven,我是Maven的新手,第一次尝试在我的项目中使用它 我已经设置了系统变量 JAVA_HOME系统变量 M2_主系统变量 %JAVA_HOME%\bin;%M2\u HOME%\bin;到系统路径 在使用“mvn-version”的cmd提示符中,我可以看到所有相关的详细信息 但是当我运行“mvn清理”时,我得到以下错误 C:\Users\Naina Mantry>mvn clean [INFO] Scanning for projects... [INFO] -------------
C:\Users\Naina Mantry>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.105 s
[INFO] Finished at: 2016-02-15T08:00:48+05:30
[INFO] Final Memory: 5M/86M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Naina
Mantry). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
我无法理解,如何修复它。请帮助我
提前感谢:)当你运行Maven时,你需要从你的proyect目录运行它,在那里你有你的工作区。你需要在这个目录上有一个pom.xml文件 例如:
C:\Users\Naina Mantry\workspace\proyect
在该目录上运行mvn clean似乎是从错误的目录执行mvn clean。请确保存在相关的pom.xml。默认情况下,Maven引用当前工作目录。或者,您可以使用-f选项指定位于不同目录中的pom.xml。是否在
C:\Us中有pom.xml
ers\Naina Mantry
?