Nexus私服环境搭建

 

1.  下载Nexus安装文件: http://www.sonatype.org/nexus/go,目前是nexus-2.13.0-01-bundle.tar.zip,版本不同,安装方式不同,新的版本不需要安装.

 

2.  解压到任意目录,进入到,bin/jsw/windows-86-64目录下

Nexus私服搭建详细步骤

把Nexus安装为本机服务

Nexus私服搭建详细步骤

 

3.  启动Nexus私服

Nexus私服搭建详细步骤

或者在windows的service中手动启动

 

4.  访问地址http://localhost:8081/nexus/,这就是私服

点击右上角登录,默认帐号admin,密码admin123

 

5.  点击左边的repositores

Nexus私服搭建详细步骤

可以看到一系列仓库类型,我们一般使用3个,分别是Releases,Snapshots和3rd party。这3个仓库风别是装稳定版,开发版和第三方jar包

 

6.  maven直接部署到nexus私服上

 

1.  修改中央仓库的setting.xml文件

<server>

      <id>nexus-releases</id>

      <username>admin</username>

      <password>admin123</password>

    </server>

 

    <server>

        <id>nexus-snapshots</id>

        <username>admin</username>

        <password>admin123</password>

    </server>

 

2.  修改maven项目的pom.xml文件,添加

<distributionManagement>

              <repository>

                     <id>nexus-release</id>

                     <name>Nexus Release Repository</name>

                     <url>http://localhost:8081/nexus/content/repositories/release/</url>

              </repository>

              <snapshotRepository>

                     <id>nexus-snapshots</id>

                     <name>Nexus Snapshot Repository</name>

                     <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>

              </snapshotRepository>

       </distributionManagement>

上面私服的URL来源于这里

Nexus私服搭建详细步骤

 

3.  在这里直接搜索安装的jar包

Nexus私服搭建详细步骤

 好了,教程结束,下次会写的详细点.

需要安装包的自行到网盘下载

注意:版本不同,安装方式不一样.

网盘地址:

链接: https://pan.baidu.com/s/1glqPQ_wv1RNCQDks6cqOkg 密码: x2va

相关文章: