阿里云仓库 + 自建私库配置

项目

pom.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<repositories>
<repository>
<id>maven2-weixin-public</id>
<name>maven2-weixin-public</name>
<url>http://maven.ctim:8081/repository/maven2-weixin-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>

maven

setting.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:/Workspace/Maven/repository</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>maven2-weixin-public</id>
<username>***</username>
<password>***</password>
</server>
<server>
<id>maven2-weixin-release</id>
<username>***</username>
<password>***</password>
</server>
<server>
<id>maven2-weixin-snapshots</id>
<username>***</username>
<password>***</password>
</server>
</servers>
<mirrors>
<!-- 阿里云仓库 -->
<mirror>
<id>aliyun-nexus</id>
<mirrorOf>*</mirrorOf>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<!-- 自建私有库 -->
<mirror>
<id>maven2-weixin-public</id>
<!-- mirrorOf 不能配置成 * -->
<mirrorOf>maven2-weixin-public</mirrorOf>
<url>http://maven.ctim:8081/repository/maven2-weixin-public/</url>
</mirror>
</mirrors>
</settings>
  • 本文作者: forever杨
  • 本文链接: https://blog.yl-online.top/posts/746cc841.html
  • 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。如果文章内容对你有用,请记录到你的笔记中。本博客站点随时会停止服务,请不要收藏、转载!