zoukankan      html  css  js  c++  java
  • maven地址配置为阿里maven仓库,附ali maven官方指南链接

     一、参考链接

    官方指南

    链接地址:https://help.aliyun.com/document_detail/102512.html?spm=a2c40.aliyun_maven_repo.0.0.36183054BpUElw

    或者:https://maven.aliyun.com/mvn/guide

    官方指南配置:

    <mirror>
        <id>aliyunmaven</id>
        <mirrorOf>*</mirrorOf>
        <name>阿里云公共仓库</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>

     二、参考配置 

    1.设置本地仓库路径

      <!-- localRepository
       | The path to the local repository maven will use to store artifacts.
       |
       | Default: ${user.home}/.m2/repository
      <localRepository>/path/to/local/repo</localRepository>
      -->
      
      <localRepository>D:dvpt_envmvn-repo</localRepository>

    2.mirros节点中加入mirro子节点

    public仓库为central仓和jcenter仓的聚合仓

    <mirror>
        <id>aliyunmaven</id>
        <mirrorOf>*</mirrorOf>
        <name>阿里云公共仓库</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror> 

    @deprecate

    <mirror>
                <id>nexus-aliyun</id>
                <mirrorOf>central</mirrorOf>
                <name>Nexus aliyun</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        </mirror>

    3.profiles节点中加入profile子节点

    非必要配置。

    <profile>
        <id>jdk-1.8</id>
        <activation>
            <jdk>1.8</jdk>
        </activation>
        <repositories>
            <!-- public是central仓和jcenter仓的聚合仓。已配置在mirror节点 -->
            <!-- 
            <repository>
                <id>public</id>
                <url>https://maven.aliyun.com/repository/public</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
             -->
            <!-- 添加spring代理仓 -->
            <repository>
                <id>spring</id>
                <url>https://maven.aliyun.com/repository/spring</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>

     .

  • 相关阅读:
    大数据基础文献综述
    牛客网数据库SQL实战
    Leetcode with Python
    tinyMCE
    HTTP LVS
    采坑大全
    Hadoop 解除 NameNode is in safe mode
    R语言采坑系列——Warning message: In validDetails.polygon(x) : 强制改变过程中产生了NA
    .Net中的异步编程
    知识点4
  • 原文地址:https://www.cnblogs.com/foolash/p/11747792.html
Copyright © 2011-2022 走看看