本地maven下载私服nexus

    <server>
        <id>central</id>
        <configuration>
            <httpConfiguration>
                <all>
                    <connectionTimeout>120000</connectionTimeout>
                    <readTimeout>120000</readTimeout>
                </all>
            </httpConfiguration>
        </configuration>
    </server>
    
    <server>
      <id>dev</id>
      <username>xx</username>
      <password>xxxxx</password>
      </server>
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
        <!--<mirror>
          <id>public</id>
          <mirrorOf>*</mirrorOf>
          <url>http://192.168.4.98:8081/repository/maven-public/</url>
        </mirror>-->
     
    <mirror>
        <id>alimaven</id>
        <name>aliyun maven</name>
        <url>
           http://maven.aliyun.com/nexus/content/groups/public/
        </url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    
      <mirror>
      <id>dev</id>
      <mirrorOf>*</mirrorOf>
      <url>http://xx:8082/repository/maven-public/</url>
    </mirror>
  </mirrors>

猜你喜欢

转载自blog.csdn.net/LRXmrlirixing/article/details/129066511