maven public network setting.xml configuration (apache-maven-3.0.3)

The public network configuration project is not very convenient, and it always takes a long time....

The following is the data source configuration and loading method that I have debugged myself, and it is better to use

<?xml version="1.0" encoding="UTF-8"?>
<settings
 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
 xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <localRepository>D:\java\repository</localRepository>
 <!-- offline
    | Determines whether maven should attempt to connect to the network when executing a build.
    | This will have an effect on artifact downloads, artifact deployment, and others.
    |
    | Default: false-->
 <offline>true</offline>
 <profiles>
  <profile>
   <id>jdRepository</id>
   <repositories>
      <repository>
       <id>jboss-cache</id>
       <name>jboss-cache</name>
       <url>http://repository.jboss.org/maven2</url>
      </repository>
      <repository>
       <id>mvnsearch</id>
       <name>mvnsearch Maven Repository</name>
     <url>http://www.mvnsearch.org/maven2</url>
    </repository>
    <repository>
     <id>ibiblio</id>
     <name>ibiblio Maven Repository</name>
     <url>http://www.ibiblio.org/maven2</url>
    </repository>
    <repository>
     <id>mirrors.ibiblio</id>
     <name>mirrors.ibiblio Maven Repository</name>
     <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
    </repository>
    <repository>
     <id>repo.springsource.org</id>
     <name>repo.springsource.org-releases</name>
     <url>http://repo.springsource.org/libs-milestone-local</url>
     <snapshots>
      <enabled>false</enabled>
     </snapshots>
    </repository>
   </repositories>
   <pluginRepositories>
    <pluginRepository>
     <id>central</id>
     <name>Maven Plugin Repository</name>
     <url>http://repo1.maven.org/maven2</url>
     <layout>default</layout>
     <snapshots>
      <enabled>false</enabled>
     </snapshots>
     <releases>
      <updatePolicy>never</updatePolicy>
     </releases>
    </pluginRepository>
   </pluginRepositories>
  </profile>
 </profiles>
 <mirrors>
  <mirror>
     <id>repo2</id>
     <mirrorOf>central</mirrorOf>
     <name>Human Readable Name for this Mirror.</name>
     <url>http://repo2.maven.org/maven2/</url>
   </mirror>
  <mirror>
     <id>net-cn</id>
     <mirrorOf>central</mirrorOf>
     <name>Human Readable Name for this Mirror.</name>
     <url>http://maven.net.cn/content/groups/public/</url>
   </mirror>
  <mirror>
     <id>ui</id>
     <mirrorOf>central</mirrorOf>
     <name>Human Readable Name for this Mirror.</name>
    <url>http://uk.maven.org/maven2/</url>
   </mirror>
  <mirror>
     <id>ibiblio</id>
     <mirrorOf>central</mirrorOf>
     <name>Human Readable Name for this Mirror.</name>
    <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
   </mirror>
  <mirror>
    <id>jboss-public-repository-group</id>
    <mirrorOf>central</mirrorOf>
    <name>JBoss Public Repository Group</name>
   <url>http://repository.jboss.org/nexus/content/groups/public</url>
  </mirror>
 </mirrors>
 <activeProfiles>
  <activeProfile>jdRepository</activeProfile>
 </activeProfiles>
</settings>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326265623&siteId=291194637