26

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

Missing artifact org.springframework.boot:spring-boot-starter-parent:jar:1.3.2.RELEASE

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

ROMANIA_engineer
  • 51,252
  • 26
  • 196
  • 186
deen
  • 2,015
  • 6
  • 27
  • 53

2 Answers2

45

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.

weeniearms
  • 646
  • 6
  • 4
  • As for now, you should use spring-boot-dependencies: https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-build-systems.html#using-boot-maven-without-a-parent – wcislo Jan 03 '19 at 16:56
0

Remove the "-SNAPSHOT" in the spring boot starter parent configuration as shown below:

Current:

<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>{version}-SNAPSHOT</version>
</parent>  

Example:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.3-SNAPSHOT</version>
</parent>

After Removing the version it looks like:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>{version}</version>
</parent>

Example:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.3</version>
</parent>
Arun Sai
  • 1,456
  • 1
  • 8
  • 20