本文介绍了缺少工件org.springframework.boot:spring-boot-starter-parent:jar:1.3.2.RELEASE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在POM.xml中由于弹簧启动依赖性而收到以下错误.

I am getting the following error in POM.xml for spring boot dependency.

我尝试了以下链接中提供的所有解决方案,但没有任何解决方案解决我的问题:
Maven2:缺少工件,但罐子到位了

I tried all the solutions given in the following link but nothing solved my problem:
Maven2: Missing artifact but jars are in place

推荐答案

您会收到此错误,因为在maven Central中没有用于spring-boot-starter-parent的jar工件,因为spring-boot-starter-parent使用pom包装.这样做的原因是因为它打算用作父pom:

You're getting this error because there is no jar artifact for spring-boot-starter-parent in maven central, since spring-boot-starter-parent uses pom packaging. The reason for that is because it's intended to be used as a parent pom:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.2.RELEASE</version>
</parent>

或者,如果您打算这样做,则可以仅导入托管依赖项:

Alternatively, you can just import the managed dependencies if that is what you intended to do:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.3.2.RELEASE</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

您可以在导入中了解有关导入依赖项的更多信息.

You can read more about importing dependencies in the Importing Dependencies section of the Introduction to the Dependency Mechanism article.

这篇关于缺少工件org.springframework.boot:spring-boot-starter-parent:jar:1.3.2.RELEASE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!