maven 公网 setting.xml 配置(apache-maven-3.0.3)

公网配置项目,不是很方便,总是需要等待很长时间....

下面是我自己调试过,比较好使的数据源配置、加载方式

<?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>

你可能感兴趣的:(maven,setting.xml,build时不更新)