【背景】 项目采用分布式服务部署,使用的是+Spring+SpringMVC+dubbo框架,IDE使用的是IDEA。 【需求】 共有两个服务,A服务依赖与B服务(A可以视为Consummer,B可以视为Provider),现在修改了B服务的代码,A服务不能用引用到新的代码,所以在IDEA-Terminal中执行代码mvn clean install deploy,将B中的代码重新打包上架。 【问题】 在执行mvn clean时,报错:
[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.caishi.leo:leo-user-service:1.0-SNAPSHOT: Could not find artifact com.caishi.leo:leo-common:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.caishi.leo:leo-user-service:1.0-SNAPSHOT (D:\data\workspace_git_commany\leo-user-service\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.caishi.leo:leo-user-service:1.0-SNAPSHOT: Could not find artifact com.caishi.leo:leo-common:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ l ine 6, column 13 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException【猜测原因】 可能时windows系统的原因。 【解决方案】 将 mvn clean 命令替换为:
mvn -s “当前maven项目的setting文件绝对路径” clean无报错,可执行。
