issues|close:mvn运行错误 --Jimmy
maven错误如下:
D:\finance>mvn tomcat:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [tomcat:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing tomcat:run
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing po
m.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Oct 21 15:53:07 CST 2011
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
D:\finance>
解决方法:
出错原因是maven工作路径不对,英文的意思是该路径下没有pom.xml文件。
进入指定目录后,然后再运行 mvn tomcat:run
这个错误经常在新人入职后第一天出现。
浙公网安备 33010602011771号