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,进入配置选项界面

  • 相关阅读:
    生成函数trick
    带权并查集维护二分图
    关于二项式反演的一些思考
    CSP集训记录
    解决Maven版本冲突
    蚂蚁金服5轮面试,最后栽这了...
    配置交换机Eth-Trunk+VRRP+MSTP+接口BFD状态联动+Telnet示例
    企业园区网络建设技术方案(华为)
    网络三层架构
    SOA治理
  • 原文地址:https://www.cnblogs.com/hopkins516/p/10127286.html
Copyright © 2011-2022 走看看