简体   繁体   English

无法从 maven 下载依赖项

[英]Can not download dependencies from maven

A month ago, I can build my Java Application successfully on my IntelliJ IDEA from scratch, and now, I have to upgrade my spring-boot to get some new features.一个月前,我可以从头开始在我的 IntelliJ IDEA 上成功构建我的 Java 应用程序,现在,我必须升级我的 spring-boot 以获得一些新功能。 But, after I change the version of spring-boot from 2.2.2.RELEASE to other version and click the button of Reload All Maven Projects, I get the message:但是,在我将 spring-boot 的版本从 2.2.2.RELEASE 更改为其他版本并单击 Reload All Maven Projects 按钮后,我收到以下消息:

org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.6.3/spring-boot-starter-parent-2.6.3.pom

It was fine a month ago for downloading 2.2.2.RELEASE.一个月前下载 2.2.2.RELEASE 还不错。 Why does the update fail at this time?为什么此时更新失败? My information is as follows: MacOS 12.2,Bundled (Maven 3), Java of 1.8, IntelliJ IDEA 2021.3 ultimate.我的信息如下: MacOS 12.2,Bundled (Maven 3), Java 1.8, IntelliJ IDEA 2021.3 Ultimate。

my pom.xml:我的 pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.*</groupId>
    <artifactId>web-site</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <modules>
        <module>study-info</module>
        <module>cloud-api</module>
    </modules>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.3</version>
        <relativePath/>
    </parent>

    <properties>
        <mysql-connector-version>8.0.16</mysql-connector-version>
        <lombok-version>1.18.10</lombok-version>
    </properties>

    <dependencyManagement>
        <dependencies>


<!--            <dependency>-->
<!--                <groupId>org.springframework.boot</groupId>-->
<!--                <artifactId>spring-boot-starter-security</artifactId>-->
<!--            </dependency>-->



            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-aop</artifactId>
            </dependency>



   
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql-connector-version}</version>
            </dependency>


  
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok-version}</version>
            </dependency>




        </dependencies>
    </dependencyManagement>



</project>

It is a network error.这是网络错误。 I changed another network of my phone's hotspot and it worked.我更改了手机热点的另一个网络,它可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM