java - idea 打包war包時(shí)候報(bào)錯(cuò)?
問(wèn)題描述
我有個(gè)項(xiàng)目:xmlivecli 目錄結(jié)構(gòu):<?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> 正式打包的時(shí)候報(bào):
[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
問(wèn)題解答
回答1:先 install 一下其他項(xiàng)目再打包
在 rpcapi 項(xiàng)目下運(yùn)行 mvn install
在 wxtools 項(xiàng)目下運(yùn)行 mvn install
在 wxapi 項(xiàng)目下運(yùn)行 mvn install
最后在 xmlivecli 項(xiàng)目下運(yùn)行 mvn package
這個(gè)依賴順序也是我的推測(cè),有可能需要調(diào)整,可以多嘗試一下.
回答2:解決了,把默認(rèn)的maven home設(shè)置成本地的就沒(méi)問(wèn)題了相關(guān)文章:
1. python - beautifulsoup獲取網(wǎng)頁(yè)內(nèi)容的問(wèn)題2. docker安裝后出現(xiàn)Cannot connect to the Docker daemon.3. Docker for Mac 創(chuàng)建的dnsmasq容器連不上/不工作的問(wèn)題4. docker-machine添加一個(gè)已有的docker主機(jī)問(wèn)題5. docker - 如何修改運(yùn)行中容器的配置6. objective-c如何實(shí)現(xiàn)java中的反射機(jī)制7. java - Spring boot 讀取 放在 jar 包外的,log4j 配置文件,系統(tǒng)有創(chuàng)建日志文件,不寫入日志信息。8. android studio總是在processes running好久9. css - 定位為absolute的父元素中的子元素 如何設(shè)置在父元素的下面?10. Android "1"=="1" 到底是true還是false
