Skip to content

Commit d263276

Browse files
committed
2018-02-07 补充 nexus
1 parent 6663930 commit d263276

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

Nexus-Install-And-Settings.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
<url>http://192.168.1.73:8081/repository/maven-snapshots/</url>
139139
</mirror>
140140
<mirror>
141-
<id>aliyun-maven</id>
141+
<id>maven-aliyun</id>
142142
<name>aliyun maven</name>
143143
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
144144
<mirrorOf>central</mirrorOf>
@@ -275,6 +275,39 @@
275275
- 重启服务:`/usr/program/nexus2.11.4/bin/nexus start`
276276

277277

278+
## Nexus3 功能
279+
280+
#### 搜索
281+
282+
- 搜索依赖(支持匹配符):<http://192.168.1.73:8081/#browse/search>
283+
284+
#### 创建角色
285+
286+
- 地址:<http://192.168.1.73:8081/#admin/security/roles>
287+
288+
#### 创建用户
289+
290+
- 地址:<http://192.168.1.73:8081/#admin/security/users>
291+
292+
#### 设置仓库
293+
294+
- 仓库常见类型:
295+
- proxy,“代理”类型,代理请求官方仓库,并缓存在本地,图中maven-central即是
296+
- hosted,“私有”仓库,公司组织内部自由仓库,比如存储自己的jar包等,maven-releases、maven-snapshots即是
297+
- group,“组”,逻辑上的,可以把几个仓库划归到某个组,对外统一的地址访问,maven-public即是,它包含了另外3个
298+
- 仓库地址:<http://192.168.1.73:8081/#admin/repository/repositories>
299+
- 设置 maven-central 的 proxy 为官网默认地址:<https://repo1.maven.org/maven2/>
300+
- proxy 的意义:当客户端访问中央库的时候,如果 Nexus 没有该依赖,则先通过 Proxy 地址下载到 Nexus 仓库,然后客户端再从 Nexus 服务器下载到本地。
301+
- 一般建议新增一个 maven-aliyun 的 proxy 类型仓库,proxy 地址是:<http://maven.aliyun.com/nexus/content/groups/public/>
302+
- 然后在 maven-public 设置 Member repositories 的时候确保 maven-aliyun 排序大于 maven-central 即可。
303+
- 设置 maven-public,集成其他仓库:<http://192.168.1.73:8081/#admin/repository/repositories:maven-public>
304+
- 一般 Member repositories 的排序建议是:maven-releases、maven-snapshots、maven-aliyun、maven-central
305+
- 如果需要设置 npm 的仓库可以看这篇文章:[Nexus OSS3创建npm 私服](https://wendyeq.me/2016/11/24/npm-registry-in-nexus-oss-3/)
306+
307+
#### 设置 task
308+
309+
- 地址:<http://192.168.1.73:8081/#admin/system/tasks>
310+
278311
## 资料
279312

280313
- <http://www.cnblogs.com/leefreeman/p/4211530.html>
@@ -287,3 +320,5 @@
287320
- <http://www.mamicode.com/info-detail-1016489.html>
288321
- <http://blog.csdn.net/shawyeok/article/details/23564681>
289322
- <http://zyjustin9.iteye.com/blog/2017321>
323+
- <https://www.xncoding.com/2017/09/02/tool/nexus.html>
324+
- <https://www.addops.cn/post/a-bite-of-nexus.html>

0 commit comments

Comments
 (0)