错误场景:执行 mvn compil 进行编译,但是编译失败,error 提示:
The following artifacts could not be resolved: com.paas.xxxxx:paas-common-access-log:jar:1.0.0-SNAPSHOT,
com.paas.xxxxx:paas-common-base:jar:1.0.0-SNAPSHOT: Could not find artifact com.paas.xxxxx:paas-
common-access-log:jar:1.0.0-SNAPSHOT -> [Help 1]
首先,先确保我们 .m2 里面是存在这些依赖的,打开 .m2 发现这些依赖是存在的,这就确定了不是我们的问题,我们依赖的公共服务出现了问题。
解决问题:找到依赖的公共组件项目执行:mvn clean install
,再次回到我们的构建的项目再次执行:mvn compil
,成功!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.336 s
[INFO] Finished at: 2019-05-06T18:44:39+08:00
[INFO] ------------------------------------------------------------------------