差异Maven构建在同一pom文件中. [英] difference maven build in same pom file.

查看:75
本文介绍了差异Maven构建在同一pom文件中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

i have a parent pom file that include 3 module...

当我从命令行在父pom"上运行"mvn install"到eclipse m2插件(运行-maven install)时,会有区别.

and there is difference when i run "mvn install" from command line on the "parent pom" to eclipse m2 plugin (run-- maven install).

当我不是从命令行运行时,我可以看到它,然后在tomcat服务器上尝试干净"运行,它向我显示此错误:

i can see it when i run from command line it's not and after that try to run "clean" on my tomcat server it show me this error:

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

Publishing failed Publishing failed with multiple errors

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'.

(他抛出的这个文件找不到文件",它们确实不存在...)

(this file he throw "File not found" they really not there...)

但是如果我去我的父pom运行->"maven install",则在我尝试清理时运行正常,没有错误.

but if i go to my parent pom run-->"maven install" it's run just fine with no error when i try to clean..

可能是什么原因?

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

i try to see if "my maven" that run in command line is different maven from eclipse but i didn't find which maven run in eclipse...

先谢谢了.

对不起,我的英语...

sorry for my English...

推荐答案

在eclipse外部运行maven时,文件将在eclipse外部进行更改.您需要做的是,在Eclipse外部通过Maven构建项目之后,在Eclipse中刷新(f5)您的项目.然后,该不同步"错误将消失.

When you run maven outside of eclipse, files are changed outside of eclipse. What you need to do is, refresh (f5) your project within eclipse after building it via maven outside of eclipse. Then that "out of sync" error will go away.

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

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

you can change maven installation from here if you need to

这篇关于差异Maven构建在同一pom文件中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆