Nexus的安装及配置

Nexus的安装及配置

下载链接:

nexus-3.13.0-01-unix.tar.gz : https://pan.baidu.com/s/1_-oMZ3fHbRyi9aPBOogAzw
nexus-3.12.1-01-win64.zip : https://pan.baidu.com/s/1Fjr46td3a93CXoe9Jb0jcw
nexus-2.12.0-01-bundle.zip : https://pan.baidu.com/s/1KyQJvW7fFt4kQ3sM6Jin3w
nexus-2.11.4-01-bundle.tar.gz : https://pan.baidu.com/s/1fL2L5DbIDtbGAJy_rdHorw

安装

1.下载完成解压后会有两个文件夹
在这里插入图片描述
2.然后管理员方式运行cmd, 进入nexus\bin目录下
3.输入命令:
nexus.exe /install
nexus.exe /run
4.查看后台计算机管理中的服务列表
在这里插入图片描述
5. localhost:8081 查看登录nexus(可能部分延迟情况需要等到30秒到1分钟时间)
(3.x版本对比2.x版本界面有点变化)
6.
默认用户密码为:
admin
admin123

项目连接

1.maven文件配置修改:
本地setting.xml里面在节点下添加内容

<servers>
	  <server>
		  <id>nexus-releases</id>
		  <username>admin</username>
		  <password>admin123</password>
	  </server>
	  <server>
			<id>nexus-snapshots</id>
			<username>admin</username>
			<password>admin123</password>
	  </server>
</servers> 

修改过用户密码的就修改成对应的
2.在项目的pom.xml中配置nexus:

<distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://localhost:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <url>http://localhost:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
  </distributionManagement>

id跟settin.xml配置的id对应
url对应nexus的仓库

在这里插入图片描述
3.项目提交上去私服测试:
命令:

mvn deploy

在这里插入图片描述
在这里插入图片描述
上次版本发布快照等对应pom.xml的配置, 快照版可多次上传有序号分别.

从私服下载需加的配置:
在pom.xml中的节点下添加

<repository>
            <id>nexus</id>
            <name>Nexus Repository</name>
            <url>http://localhost:8081/repository/maven-public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
</repository>

加多节点

<pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>Nexus Plugin Repository</name>
            <url>http://localhost:8081/repository/maven-public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>

        <pluginRepository>
            <id>aliyun-repos</id>
            <name>Aliyun Repository</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
</pluginRepositories>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值