在命令窗口输入 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 pom.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: Sat Jul 31 22:43:52 CST 2010
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------

解决方案 »

  1.   

    [INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.
      

  2.   

    pom.xml和setting.xml中有没有配置tomcat插件?
      

  3.   

    我的插件应该是配好的啊!setting.xml里面不是就配tomcat的路劲吗?pom.xml不知道怎么配
      

  4.   

    setting.xml里配的是maven私服的路径,就是maven要下载jar包的路径