1

I'm brand new to Java. I'm following https://spring.io/guides/gs/rest-service/#scratch (mostly). I'm at the point of standing up the web service, but I'm getting the error in the title.

I'm running

./mvnw clean package

My pom.xml is

<?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.3.RELEASE</version>
    </parent>
    <groupId>caleo</groupId>
    <artifactId>greeter</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>greeter</name>
    <description>Greeter Application</description>

    <repositories>
        <repository>
            <id>spring-releases</id>
            <url>http://repo.spring.io/libs-release</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-releases</id>
            <url>http://repo.spring.io/libs-release</url>
        </pluginRepository>
    </pluginRepositories>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>springloaded</artifactId>
                        <version>2.1.3.RELEASE</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>

Questions that have not helped:

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

The recommendation is to use a parent tag, but I have

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

In my pom.xml and that doesn't solve the issue. I tried adding the dependecyManagement tag, but got the error

package org.springframework.boot does not exist

Maven and Spring Boot - non resolvable parent pom - repo.spring.io (Unknown host)

This is different from my error message. Also, the recommended solution is to check if you can access http://repo.spring.io/, which I can.

Spring boot , pom.xml

This is another network issue. I should have a direct network connection.

(Basically all the quetions I found the answer is parent, dependencies, or network issues, all of which I can rule out.)

Jonathan Cast
  • 4,569
  • 19
  • 34

0 Answers0