maven 私服
一般遇到下载失败的情况,是因为用户设置了本地镜像,导致无法从JEECG私服下载资源,参考下面的方式进行镜像排除配置即可。JEECG存在自定义JAR包,放在自己的Maven私服上面,所以有的时候会遇到下载失败情况。
一、找到 maven老家 conf/settings.xml,
在标签内增加下面方式的阿里云maven镜像(删除自己的镜像配置), 最终结果见下面:
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*,!jeecg,!jeecg-snapshots,!getui-nexus</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
- 此配置重点在这句话
*,!jeecg,!jeecg-snapshots
如果不加这句话,默认所有的依赖都会去阿里云仓库下载,加上后jeecg的依赖包就可以从jeecg私服下载了。
二、项目中加入aliyun和jeecg的镜像地址
<repositories>
<repository>
<id>aliyun</id>
<name>aliyun Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jeecg</id>
<name>jeecg Repository</name>
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<repository>
<id>jeecg-snapshots</id>
<name>jeecg snapshots Repository</name>
<url>https://maven.jeecg.org/nexus/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>