我刚创建了一个新的Spring Boot项目,但在pom.xml文件中遇到了问题,不知道如何解决,请有经验的人帮忙。
这是我的pom.xml文件,第一行出现了错误。 “从https://repo.maven.apache.org/maven2无法传输org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2, 已缓存在本地仓库中,直到中央更新间隔过去或强制更新后才会重新尝试解析。原始错误:无法传输组织.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2 从/到中央(https://repo.maven.apache.org/maven2):操作被取消。”
这是我的pom.xml文件,第一行出现了错误。 “从https://repo.maven.apache.org/maven2无法传输org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2, 已缓存在本地仓库中,直到中央更新间隔过去或强制更新后才会重新尝试解析。原始错误:无法传输组织.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2 从/到中央(https://repo.maven.apache.org/maven2):操作被取消。”
<?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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.amol.student.dal</groupId>
<artifactId>studentdal</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>studentdal</name>
<description>Student DAL</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>