`
T123012009065
  • 浏览: 52473 次
文章分类
社区版块
存档分类
最新评论

MVN 构建项目时的一个问题--Could not resolve de pendencies for projec

阅读更多

错误的现场是下面这个样子:

[INFO]recharge-dal......................................SUCCESS[0.940s]

[INFO]recharge-service..................................FAILURE[0.060s]

[INFO]recharge-front-web................................SKIPPED

[INFO]------------------------------------------------------------------------

[INFO]BUILDFAILURE

[INFO]------------------------------------------------------------------------

[INFO]Totaltime:2.110s

[INFO]Finishedat:TueDec0414:57:23CST2012

[INFO]FinalMemory:8M/14M

[INFO]------------------------------------------------------------------------

[ERROR]Failedtoexecutegoalonprojectrecharge-service:Couldnotresolvede

pendenciesforprojectcom.xxxxxx:recharge-service:jar:1.0.0-SNAPSHOT:Failure

tofindcom.xxxxxx:recharge-dal:jar:1.0.0-SNAPSHOTinhttp://192.168.xxx.xxx:8

081/nexus/content/groups/public/wascachedinthelocalrepository,resolution

willnotbereattempteduntiltheupdateintervalofmaven-nethaselapsedorup

datesareforced->[Help1]

[ERROR]

[ERROR]Toseethefullstacktraceoftheerrors,re-runMavenwiththe-eswit

ch.

[ERROR]Re-runMavenusingthe-Xswitchtoenablefulldebuglogging.

[ERROR]

[ERROR]Formoreinformationabouttheerrorsandpossiblesolutions,pleaserea

dthefollowingarticles:

[ERROR][Help1]http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso

lutionException

[ERROR]

[ERROR]Aftercorrectingtheproblems,youcanresumethebuildwiththecommand


[ERROR]mvn<goals>-rf:recharge-service


因为这个项目是三个独立项目依靠依赖关系结合在一起的recharge-front-web-->recharge-service-->recharge-dal。

这样的话就需要在web里包含其他两jar包。

从错误的意思上来说“找不到依赖的包com.xxxxxx:recharge-service:jar:1.0.0-SNAPSHOTcom.xxxxxx:recharge-dal:jar:1.0.0-SNAPSHOT"

之前也不知道怎么解决,然后问了前辈,在她的指点下找到了解决的方法,最终一切顺利。

具体的思路是这样的:因为错误提示是找不到依赖的包,所以就到相应的位置找相应的包。

首先进入mvn的repository目录,就是我们从服务器下载jar包存放的位置,

然后安装上面的那段路劲查找com-->xxxxxx-->recharge-service-->....1.0.0-SNAPSHOT.jar.lastUpdate

1.0.0-SNAPSHOT.jar.lastUpdate我们需要的是jar,结果看到的文件后面多了.lastUpdate,于是把多余的部分去掉。

最后再执行mvneclipse:eclipse

结果前面的问题就解决了。


把这个问题写下来,希望能帮助到碰到和我一样问题的朋友们。


本来转载,用这个方法没问题,朋友们如果你用eclipse的插件编译没问题,可使用控制台有问题,大概是用的库不一样

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics