本文已参与「新人创作礼」活动,一起开启掘金创作之路。
最近公司接了二次外包项目,项目是使用 JeecgBoot (doc.jeecg.com/) 搭建的,第一次导入项目怎么都不成功,报了如下错误。
[ERROR] Failed to execute goal on project xxx-base-core: Could not resolve dependencies
for project org.dekunframework.boot:xxxx-base-core:jar:2.4.0: The following artifacts
could not be resolved: org.hibernate:hibernate-re:jar:2.3.07,
org.jeecgframework.boot:codegenerate:jar:1.2.5: Cannot access nexus-aliyun
(http://maven.aliyun.com/nexus/content/groups/public) in offline mode and the artifact
org.hibernate:hibernate-re:jar:2.3.07 has not been downloaded from it before. -> [Help 1]
最后处理方法是我本地用的[maven]需要使用mirrorOf排除掉jeecg;
原配置:
<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
需要添加配置:
<mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>
修改后配置:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>