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>
  • 相关阅读:
    pb9 json,Powerbuilder json parser
    ubuntu 16.04 安装VS CODE时 此软件来自第三方且可能包含非自由组件
    【转】C# XML序列化去掉XML默认的命名空间及声明头
    SQL Server孤立账户解决办法
    mirror op 如果在windows receiver上是黑屏
    C# .net WebRequest HttpWebRequest 禁用系统默认代理。
    解决“chrome adobe flash player不是最新版本”的方法
    python使用sqlalchemy连接pymysql数据库
    python2.0_s12_day11_SqlAlchemy使用介绍
    python2.0_s12_day9_协程&多线程和cpu,磁盘io之间的关系
  • 原文地址:https://www.cnblogs.com/zhizou/p/12861539.html
Copyright © 2011-2022 走看看