1. 安装

复制nexus-oss-webapp-1.9.2.2-bundle.zip 到D盘解压。

进入: D:\nexus-oss-webapp-1.9.2.2-bundle\nexus-oss-webapp-1.9.2.2\bin\jsw\windows-x86-64

三、私服安装和配置(学习笔记)

以管理员身份运行:Installnexus.bat 将nexus 安装为系统服务

三、私服安装和配置(学习笔记)

再次可以启动或关闭 nexus 服务。

http://localhost:8081/nexus/index.htm

admin/admin123

 

 

2. 配置maven使用nexus

在 ~/.m2/setting.xml 中进行配置。

<mirrors>

    <!-- 配置镜像,让所有请求都指向私服,禁止直接访问任何其他服务器 -->

    <mirror>

       <id>nexus</id>

       <mirrorOf>*</mirrorOf>

       <name>Human Readable Name for this Mirror.</name>

       <url>http://localhost:8081/nexus/content/groups/public/</url>

    </mirror>

</mirrors>

<profiles>

    <!-- 配置私服信息 -->

    <profile>

       <id>nexus</id>

       <repositories>

           <repository>

              <id>nexus</id>

              <name>Nexus</name>

              <url>http://localhost:8081/nexus/content/groups/public/</url>

              <releases>

                  <enabled>true</enabled>

              </releases>

              <snapshots>

                  <enabled>true</enabled>

              </snapshots>

           </repository>

       </repositories>

       <pluginRepositories>

           <pluginRepository>

              <id>nexus</id>

              <name>Nexus</name>

              <url>http://localhost:8081/nexus/content/groups/public/</url>

              <releases>

                  <enabled>true</enabled>

              </releases>

              <snapshots>

                  <enabled>true</enabled>

              </snapshots>

           </pluginRepository>

       </pluginRepositories>

    </profile>

</profiles>

<!--**私服 -->

<activeProfiles>

    <activeProfile>nexus</activeProfile>

</activeProfiles>

 


学习资料:《MAVEN实战》  

相关文章:

  • 2022-01-10
  • 2022-01-05
  • 2021-08-20
  • 2021-07-19
  • 2021-12-26
  • 2022-02-07
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-12-28
  • 2021-06-14
  • 2021-08-08
  • 2022-01-14
  • 2021-11-18
  • 2022-12-23
相关资源
相似解决方案