Failed to run Goal org.springframework.boot:spring-boot-Maven-plugin:2.4.3:run (default-cli)

Asked

Viewed 282 times

-1

I have the following error in developing an application using the following tools:

When running mvn spring-boot:run, it shows the error Failed to execute Goal org.springframework.boot:spring-boot-Maven-plugin:2.4.3:run (default-cli) on project Heroesapi

  1. Spring Boot
  2. Maven 2.4.3
  3. Swagger
  4. Dynamodb
  5. Webflux
  6. Lombok,SLF4J

Below is my pom.xml file with all downloaded dependencies

<?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 https://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.4.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.digitalinnovationheroes</groupId>
    <artifactId>HeroesAPI</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>HeroesAPI</name>
    <description>API de armazenamento de heróis com webflux</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-rsocket</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-messaging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-rsocket</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-webflux-ui</artifactId>
            <version>1.2.32</version>
        </dependency>
        <dependency>
            <groupId>com.github.derjust</groupId>
            <artifactId>spring-data-dynamodb</artifactId>
            <version>5.0.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>dynamodb</artifactId>
            <version>2.0.0-preview-9</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>HeroesApiApplication</mainClass>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

1 answer

1

I believe you’re trying to follow the DIO Bootcamp Inter project. Probably during the processing of the installation gave some kind of problem that is not able to identify, here I was able to solve as follows:

In the root directory of your project run the command (Linux):

$ ./mvn clean install

If you imported your project with Intellij for example, try:

$ ./mvnw clean install

Finally run the run again:

$ ./mvn spring-boot:run

or

$ ./mvnw spring-boot:run

Please give an upvote if this answer was helpful to you. Good luck!

  • Man, it all worked out and solved this cli problem, thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.