Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java maven插件过时了_Java_Spring_Maven_Plugins - Fatal编程技术网

Java maven插件过时了

Java maven插件过时了,java,spring,maven,plugins,Java,Spring,Maven,Plugins,当我想在STS中启动一个新的maven项目并从JavaBrains教程中创建我的第一个简单spring项目时,我收到了以下错误: Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.6.1:runtime Cause: error in opening zip file 我不知道发生了什么 我的pom.xml文件: <p

当我想在STS中启动一个新的maven项目并从JavaBrains教程中创建我的第一个简单spring项目时,我收到了以下错误:

Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.6.1:runtime Cause: error in opening zip file
我不知道发生了什么

我的pom.xml文件:

<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>io.test.spring</groupId>
<artifactId>course-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Test Spring API</name>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.2.RELEASE</version> // i try another version and this same..
</parent>

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

<properties>
    <java.version>1.8</java.version>
</properties>

4.0.0
io.test.spring
课程api
0.0.1-快照
测试弹簧API
org.springframework.boot
spring启动程序父级
1.5.2.RELEASE//我尝试了另一个版本,这个版本相同。。
org.springframework.boot
SpringBootStarterWeb
1.8

从以下文件夹中删除内容有助于解决此问题。希望这有帮助

C:\Users\.m2\repository\org\apache\maven\plugins\maven jar plugin\


然后运行:mvn clean install

您需要从本地maven存储库中删除现有版本。
然后使用-U选项运行干净的安装

您的pom.xml文件似乎有问题

  • 确保存储库中有可用的
    springbootstarterparent
    ,看起来您已经将工件名称编辑为
  • 您的第二个控制台显示您已在
    pom.xml
    中使用
    对单行进行了注释,因此它将打印为
    预期的开始标记或结束标记而不是文本(位置:已看到文本…\r\n\t\r\n\
    使用
    pom.xml
    文件中进行注释

  • 希望这有助于解决问题。

    我这次正确下载了maven-clean-plugin-2.6.1.jar,这是一个同样的问题。你的意思是说你已经更正了pom.xml文件和可用的父依赖项??我确定,我尝试手动替换新的maven-clean插件,并尝试其他父版本,以及使用不同的p解决同样的问题Lugin希望您在pom.xml标记中添加了maven,请选择您的项目,按Alt+F5并标记快照/发布的强制更新,然后单击“确定”,即使遇到相同问题,也请发布您的控制台。