首页 > 解决方案 > 无法解决 Gradle Mail 依赖项

问题描述

每次我尝试构建我的 Spring Boot 项目(使用 Gradle 6.5)时都会出现以下错误:

    Execution failed for task ':compileJava'.
 Could not resolve all files for configuration ':compileClasspath'.
    Could not resolve org.springframework.boot:spring-boot-starter-mail:2.3.0.RELEASE.
     Required by:
         project :
       Could not resolve org.springframework.boot:spring-boot-starter-mail:2.3.0.RELEASE.
          Could not parse POM https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-mail/2.3.0.RELEASE/spring-boot-starter-mail-2.3.0.RELEASE.pom
             Content is not allowed in prolog.
    Could not resolve org.springframework.boot:spring-boot-starter-mail:2.3.0.RELEASE.
     Required by:
         project :  org.springframework.boot:spring-boot-starter-webflux:2.3.0.RELEASE > org.springframework.boot:spring-boot-dependencies:2.3.0.RELEASE
       Could not resolve org.springframework.boot:spring-boot-starter-mail:2.3.0.RELEASE.
          Could not parse POM https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-mail/2.3.0.RELEASE/spring-boot-starter-mail-2.3.0.RELEASE.pom
             Content is not allowed in prolog.

我在一个团队中工作,没有其他人有同样的错误,似乎我们都做了同样的事情。我尝试手动将一个库设置为我从 Oracle 网站下载的 javax.mail.jar,但它没有帮助。以下行来自添加依赖项的 build.gradle 文件:

implementation 'org.springframework.boot:spring-boot-starter-mail'

谁能帮我这个?

标签: spring-boot

解决方案


推荐阅读