【Android Gradle 插件】将自定义 Gradle 插件上传到自建 Maven 仓库 ⑤ ( 使用 Sonatype Nexus 搭建 Maven 仓库 )

Android Plugin DSL Reference 参考文档 :





一、下载 Sonatype Nexus



Sonatype 官方网站 : https://www.sonatype.com/

在首页选择 " nexus repository " 进入 Sonatype Nexus 页面 ;
在这里插入图片描述

下载地址 : https://help.sonatype.com/repomanager3/product-information/download

在这里插入图片描述

下载太慢了 , 推荐从 CSDN 中下载一个 Sonatype Nexus 版本 nexus-3.27.0-03-win64 ;

下载后 , 解压 , 内容如下 :
在这里插入图片描述

查询 nexus.exe 对应的命令行选项 , 执行

nexus.exe /help

命令 , 可查看执行选项 :

Usage: nexus.exe /install | /uninstall | /stop | /start | /status | /run | /run-redirect

在这里插入图片描述





二、使用 Sonatype Nexus 搭建 Maven 仓库



在 Sonatype Nexus 的解压目录中 , 其中 cmd 命令行工具 , 执行

nexus.exe /run

命令 , 该启动过程事件很长 , 可能会有 5 ~ 10 分钟 , 甚至更长 ;

在这里插入图片描述
期间会弹出下面的警报框 , 说明启动成功 ;
在这里插入图片描述

启动成功后 , 命令行显示如下内容 : ( 启动时间很长 )
在这里插入图片描述

执行

nexus.exe /status

可查看当前状态 ;

默认的访问地址是 http://localhost:8081/ , 在浏览器中访问该地址 , 即可进入仓库管理界面 ;

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/han1202012/article/details/127385094