maven私服安装,对于很多公司来说有各种各样必须的理由安装maven私服,原因不咋赘述,本文介绍如何搭建公司内的私服环境。
安装环境为windows。
下载
网址:https://www.sonatype.com/
我当前使用的版本地址:
https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-3.38.0-01-win64.zip
注意:
现在官网下载比较费劲,可以挂代理,或者百度搜,下不动的时候,有时候可以用迅雷,会有速度。
下载后文件如下;

端口号配置(可选)

安装为系统服务
进入安装目录的bin目录下,通过命令:
nexus.exe /install nexus3
安装为名为nexus3的Windows服务

检查确认服务
可以通过控制面板找到服务,或者win+R,输入services.msc 打开
如果是自己的开发机器研究,可以设置为手动启动
初始安装后还未启动,可以直接右键 启动

启动
稍等几秒钟之后,根据Ip以及端口号进行访问


登录
右上角 login
根据提示找到初始化密码,然后进行登录即可

成功登录后有一些自动弹出的tips ,可以简单看下

其中有一个是否允许匿名访问,自行按需选择

镜像配置
进入界面之后,点击右侧 repositories
添加阿里云镜像
选择类型

组调整


查看信息

自己本机的maven 中的setting.xml文件中的配置如下
<!-- 私服地址 -->
<mirror>
<!--This is used to direct the public snapshots repo in the profile below over to a different nexus group -->
<id>maven-address</id>
<mirrorOf>*</mirrorOf>
<!-- 此处配置你的Nexus地址 -->
<url>http://192.168.1.128:9081/repository/maven-public/</url>
</mirror>
转载务必注明出处:程序员潇然,疯狂的字节X,https://www.crazybytex.com/thread-30-1-1.html
|