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] BUILD FAILURE

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

[INFO] Total time: 2.110s

[INFO] Finished at: Tue Dec 04 14:57:23 CST 2012

[INFO] Final Memory: 8M/14M

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

[ERROR]Failed to execute goal on project recharge-service: Could not resolve de

pendencies for project com.xxxxxx:recharge-service:jar:1.0.0-SNAPSHOT: Failure

 to find com.xxxxxx:recharge-dal:jar:1.0.0-SNAPSHOT in http://192.168.xxx.xxx:8

081/nexus/content/groups/public/ was cached in the local repository, resolution

will not be reattempted until the update interval of maven-net has elapsed or up

dates are forced-> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

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

lutionException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command


[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,于是把多余的部分去掉。

最后再执行mvn eclipse:eclipse

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


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


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

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值