maven私服上传jar

maven私服上传jar

1、http://IP:port/nexus/index.html#view-repositories;yuntu~browseindex

登录网站,通常账号密码为admin admin123

maven私服上传jar

2、新建local repositor

maven私服上传jar

3、上传jar

maven私服上传jar

4、查看发布的jar

maven私服上传jar

4、获取repository地址

maven私服上传jar

5、配置maven setting.xml

<servers>

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

<mirrors>

 <mirror>
          <id>alimaven</id>
          <name>yuntu</name>
          <url>http://X:X/nexus/content/repositories/yuntu</url>
          <mirrorOf>central</mirrorOf>
      </mirror>
     <mirror>
          <id>nexus</id>
          <name>internal nexus repository</name>
          <url>http://X:X/nexus/content/repositories/yuntu</url>
          <mirrorOf>central</mirrorOf>
      </mirror>

  </mirrors>

6、pom.xml配置

<dependency>
    <groupId>XXX</groupId>
    <artifactId>XXX</artifactId>
    <version>1.3</version>
    <classifier>final</classifier>
</dependency>