差异maven在同一个pom文件中构建。

时间:2012-03-21 18:00:23

标签: eclipse maven

我有一个包含3个模块的父pom文件......

并且当我从“父pom”的命令行运行“mvn install”到eclipse m2插件(run - maven install)时会有区别。

当我从命令行运行时,我可以看到它,然后尝试在我的tomcat服务器上运行“clean”,它会向我显示此错误:

发布失败 发布失败并出现多个错误

File not found: D:\Projects\starto-v1\Tomcat Servlet\target\m2e-wtp\web-resources\META-INF\MANIFEST.MF.
File not found: D:\Projects\starto-v1\Tomcat Servlet\target\m2e-wtp\web-resources\META-INF\maven\starto.starto\MavenWeb-starto\pom.properties.
File not found: D:\Projects\starto-v1\Tomcat Servlet\target\m2e-wtp\web-resources\META-INF\maven\starto.starto\MavenWeb-starto\pom.xml.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/MeetReq/MeetReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/MeetReq/MeetReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/MsgReq/MsgReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/MsgReq/MsgReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/HelloWorldServlet.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/LocUpdateServlet.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/MeetServlet.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/MsgServlet.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/SearchServlet.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/SingInUpOut.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/c2dm.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/Servlets/imAlive.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/c2dm/FakeHostnameVerifier.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/c2dm/NameValuePair.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/c2dm/c2dmReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/c2dm/c2dmReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/db/managment/Dbconnection.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/db/managment/DbquaryExecutor.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/net/viralpatel/maven/ReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/search/SearchReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/servlet/common/CommonFun.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/signInUpOutReq/SignInUpOutReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/signInUpOutReq/SignInUpOutReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/imAlive/IsAliveChecker.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/imAlive/IsAliveCheckerThread.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/imAlive/imAliveReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/imAlive/imAliveReqHandler.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/loc/req/UpdateLocReqHandler$1.class'.
Resource is out of sync with the file system: '/MavenWeb-starto/target/classes/update/loc/req/UpdateLocReqHandler.class'.
File not found: D:\Projects\starto-v1\Hibernett\target\classes\META-INF\maven\starto.starto\Hibernet-starto\pom.properties.
Resource is out of sync with the file system: '/Common-starto/target/classes/Entities/LocationStartTo.class'.

(这个文件他抛出“找不到文件”他们真的不在那里......)

但如果我去父母pom run - >“maven install”它运行得很好,当我尝试清理时没有错误..

可能是什么原因?

我试着看看在命令行中运行的“我的maven”是否与eclipse不同,但我没有找到哪个maven在eclipse中运行...

提前感谢..

抱歉我的英文......

1 个答案:

答案 0 :(得分:10)

当你在eclipse之外运行maven时,文件会在eclipse之外被更改。你需要做的是,在eclipse之外通过maven构建项目后,在eclipse中刷新(f5)你的项目。然后,“不同步”错误将消失。

window -> preferences -> maven -> installations -> 

如果需要,您可以从此处更改maven安装

相关问题