Maven configuration Alibaba Cloud warehouse configuration in 2022

Alibaba Cloud warehouse address has been changed from http to https

以前:http://maven.aliyun.com/repository/public
现在:https://maven.aliyun.com/repository/public

(1/3) The completed settings.xml configuration is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <!-- 本地仓库地址 -->
  <localRepository>D:\repository</localRepository>
  <servers></servers>
  <pluginGroups></pluginGroups>

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

  <profiles>
    <!-- 全局JDK1.8配置 -->
    <profile>
      <id>jdk1.8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <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>

After modifying the above content, in order to make the download dependencies smoother, you need to modify the IDEA configuration

(2/3) Click the File--Settings search box to enter maven (as shown below), then click Importing, and enter the configuration in VM options for imorter:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

 (3/3) Continue to click Maven--Runner and enter the configuration in VM options:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

 Finally, Apply--OK completes the configuration and enjoys the silky smoothness~~

Guess you like

Origin blog.csdn.net/idto315/article/details/122888893