打开解压目录:
- Java环境
- Maven环境
- nexus安装包
-> nexus-3.32.0-03 安装目录 ..... 主要文件夹 -> bin 命令文件目录 -> etc 配置文件目录 -> sonatype-work 工作目录
# 进入文件bin目录 nexus-3.32.0-03 -> cd ./nexus-3.32.0-03/bin # 运行nexus bin -> ./nexus run访问网址
http://localhost:8081/
登录账号密码,在安装文件目录下
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-qmkaLjKr-1636458370486)(/Users/zwl/Library/Application Support/typora-user-images/image-20211108122712143.png)]
配置nexus3找到安装根目录: /apache-latest-nexus-3.32/nexus-3.32.0-03/etc
修改 nexus-default.properties
| 仓库名 | 作用 |
|---|---|
| hosted 宿主仓库 | 要用于部署无法从公共仓库获取的构件以及自己或第三方的项目构件(存放本公司开发的jar包(正式版本、测试版本)) |
| proxy 代理仓库 | 代理公共的远程仓库 |
| group 仓库组 | Nexus 通过仓库组统一管理多个仓库,这样我们在项目中直接请求仓库组即可请求到仓库组管理的多个仓库(使用时连接组仓库,包含Hosted(宿主仓库)和Proxy(代理仓库)) |
| release仓库 | 内部的模块中release模块的发布仓库 |
| snapshots | 发布那些非release版本, 非稳定版本 |
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-LUsxtIj0-1636458370489)(/Users/zwl/Library/Application Support/typora-user-images/image-20211109102026379.png)]
maven配置文件setting.xml
weiwei-releases admin XXX wei-snapshots admin XXX nexus * Nexus weiwei http://localhost:8081/repository/maven-public aliyun * Nexus aliyun http://maven.aliyun.com/nexus/content/groups/public
pom.xml
releases Nexus Release Repository http://localhost:8081/repository/maven-releases/ snapshots Nexus Snapshot Repository http://localhost:8081/repository/maven-snapshots/



