zoukankan      html  css  js  c++  java
  • IDEA配置maven中央库

    分两步:
    STEP 1:配置maven;
    STEP 2:配置IDEA。区分默认配置和项目级配置。

    STEP 1:maven中央库配置

    国内常用的maven库主要是阿里云maven库、华为云maven。

    其中阿里云maven库配置如下:

    配置文件路径为conf/settings.xml

    <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>alimaven</id>
                <mirrorOf>central</mirrorOf>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            </mirror>
        
            <!-- 中央仓库1 -->
            <mirror>
                <id>repo1</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo1.maven.org/maven2/</url>
            </mirror>
        
            <!-- 中央仓库2 -->
            <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>nexus-aliyun</id>
                 <mirrorOf>*</mirrorOf>
                 <name>Nexus aliyun</name>
                 <url>http://maven.aliyun.com/nexus/content/groups/public</url>
            </mirror>
      </mirrors>

    STEP 2:IDEA配置

    打开IDEA,按下Ctrl+Alt+S,进入配置选项界面

  • 相关阅读:
    XTU 1250 Super Fast Fourier Transform
    XTU 1249 Rolling Variance
    XTU 1243 2016
    CodeForces 710A King Moves
    CodeForces 710B Optimal Point on a Line
    HDU 4472 Count
    并查集
    高精度四件套
    Kruskal最小生成树
    [蓝桥杯]翻硬币(贪心的详解附带题目测试链接)
  • 原文地址:https://www.cnblogs.com/HopkinsCybn/p/10127286.html
Copyright © 2011-2022 走看看