maven

1、打开maven配置文件(maven安装目录下的conf目录下的settings.xml文件)

2、搜索mirrors关键字,如果注释说明的下方没有  <mirrors>节点,则建立mirrors节点,带mirrors节点的所有配置如下(复制下面的内容,粘贴到配置文件中即可):

   <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>ibiblio.org</id> 
           <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name> 
           <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> 
           <mirrorOf>central</mirrorOf> 
           <!-- United States, North Carolina --> 
     </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>

你可能感兴趣的:(maven)