zoukankan      html  css  js  c++  java
  • 解决idea里边maven下载慢的问题

    一、更改项目的maven包目录

    二、设置settings.xml  ( apache-maven-3.6.0confsettings.xml)

     在标签mirrors里边添加阿里提供的代理

    <mirrors>
         <mirror>
                <id>alimaven</id>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
    
            <mirror>
                <id>uk</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://uk.maven.org/maven2/</url>
            </mirror>
    
            <mirror>
                <id>CN</id>
                <name>OSChina Central</name>
                <url>http://maven.oschina.net/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
    
            <mirror>
                <id>nexus</id>
                <name>internal nexus repository</name>
                <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
                <url>http://repo.maven.apache.org/maven2</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
      </mirrors>

    完整的配置

    <?xml version="1.0" encoding="UTF-8"?>
    
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
      <pluginGroups>
    
      </pluginGroups>
    
      <proxies>
    
      </proxies>
    
      <servers>
      </servers>
    
      <mirrors>
    
         <mirror>
                <id>alimaven</id>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
    
            <mirror>
                <id>uk</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://uk.maven.org/maven2/</url>
            </mirror>
    
            <mirror>
                <id>CN</id>
                <name>OSChina Central</name>
                <url>http://maven.oschina.net/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
    
            <mirror>
                <id>nexus</id>
                <name>internal nexus repository</name>
                <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
                <url>http://repo.maven.apache.org/maven2</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
      </mirrors>
    
      <profiles>
          <profile>
          <id>jdk-1.8</id>
    
          <activation>
              <activeByDefault>true</activeByDefault>
            <jdk>1.8</jdk>
          </activation>
          <properties>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
            <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
          </properties>
        </profile>
    
      </profiles>
    
    </settings>
  • 相关阅读:
    2016华为实习编程题:停车管理系统
    lintcode:单词切分
    2016网易实习生编程题:数组中两个数的和等于sum
    2016网易实习生编程题:n个骰子的和等于m
    2016百度编程题:钓鱼比赛
    2016百度编程题:裁减网格纸
    2016百度编程题:罪犯转移
    JAVA面试基础
    扔硬币问题
    随机数生成随机数
  • 原文地址:https://www.cnblogs.com/zhizou/p/12861539.html
Copyright © 2011-2022 走看看