使用spring initializr导入项目时出现Maven错误 - 3.0.1

时间:2017-10-03 15:35:23

标签: java spring eclipse maven spring-boot

我正在尝试启动一个项目来学习弹簧启动,但是maven出现了错误。

  

错误:插件org.apache.maven.plugins:maven-resources-plugin:3.0.1   或其中一个依赖项无法解决:无法读取   工件描述符   org.apache.maven.plugins:行家资源-插件:罐:3.0.1

     

插件org.apache.maven.plugins:maven-resources-plugin:3.0.1或其中一个依赖项无法解析:无法读取org.apache.maven.plugins的工件描述符:maven-resources-plugin :罐:3.0.1

     

无法计算构建计划:插件org.apache.maven.plugins:maven-resources-plugin:3.0.1或其中一个依赖项无法解析:无法读取org.apache.maven.plugins的工件描述符:行家资源-插件:罐:3.0.1

     

插件org.apache.maven.plugins:maven-resources-plugin:3.0.1或其中一个依赖项无法解析:无法读取org.apache.maven.plugins的工件描述符:maven-resources-plugin :罐:3.0.1

我的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.springboot.basics</groupId>
<artifactId>springboot-in-10-steps</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>springboot-in-10-steps</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.M4</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </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>

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

0 个答案:

没有答案