java - idea 打包war包时候报错?
问题描述
我有个项目:xmlivecli 目录结构:<?xml version='1.0' encoding='UTF-8'?><beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:motan='http://api.weibo.com/schema/motan' xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://api.weibo.com/schema/motan http://api.weibo.com/schema/motan.xsd'> <motan:protocol default='true' name='motan' maxServerConnection='80000' maxContentLength='1048576' maxWorkerThread='800' minWorkerThread='20' /> <!-- reference to the remote service --> <motan:referer interface='com.njmdedu.wxapi.WxClientRPCService' directUrl='192.168.1.1:8452' requestTimeout='5000' timeout='5000' /> <motan:referer interface='com.njmdedu.rpc.api.UserRPCService' directUrl='192.168.1.1:8492' requestTimeout='5000' timeout='5000' /> <motan:referer interface='com.njmdedu.rpc.api.WcUserRPCService' directUrl='192.168.1.1:8493' requestTimeout='5000' timeout='5000' /> <motan:referer interface='com.njmdedu.rpc.api.KindergartenRPCService' directUrl='192.168.1.1:8495' requestTimeout='5000' timeout='5000' /></beans> 正式打包的时候报:
[ERROR] Failed to execute goal on project xmlivecli: Could not resolve dependencies for project com.njmdedu:xmlivecli:war:1.0.0: The following artifacts could not be resolved: com.njmdedu:wxapi:jar:0.0.1, com.njmdedu:rpcapi:jar:0.0.1: Failure to find com.njmdedu:wxapi:jar:0.0.1 in http://192.168.1.123:8081/nexus/content/groups/md_local_repo/ was cached in the local repository, resolution will not be reattempted until the update interval of md_local_repo has elapsed or updates are forced -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[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 read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExceptionProcess finished with exit code 1
问题解答
回答1:先 install 一下其他项目再打包
在 rpcapi 项目下运行 mvn install
在 wxtools 项目下运行 mvn install
在 wxapi 项目下运行 mvn install
最后在 xmlivecli 项目下运行 mvn package
这个依赖顺序也是我的推测,有可能需要调整,可以多尝试一下.
回答2:解决了,把默认的maven home设置成本地的就没问题了相关文章:
1. 数据库安全 - 在公网上部署mysql数据库,安全方面需要做到哪些注意事项2. Android中如何根据不同java文件的功能来分类,例如分成activity adapter bean等等3. python2.7 - 在Eclipse开发Python,怎么去掉控制台输出的其他消息??4. javascript - angular2中directive获取点击事件5. css - div内部滚动,安卓没有滚动条(非body滚动),有什么办法可以显示吗?6. angular.js - angularJs使用iframe,网页内容自适应的问题7. php mysql_query()问题8. python - nginx为什么不能反代图片?9. python - django里GROUP BY 如何写这样的mysql语句?10. angular.js - angular ui bootstrap 中文显示问题
