Maven - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.3:run

 
Vista:
Imágen de perfil de Matias

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.3:run

Publicado por Matias (1 intervención) el 08/05/2023 23:02:57
Saludos a todos. Les comento, estoy desarrollando un proyecto con netbeans 8.2 en java y spring (soy nuevo en esto), lo inicié con start.spring.io. Miren, este error aparece cuando le doy run a mi proyecto.

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.3:run (default-cli) on project almacendemo: Application finished with exit code: 1 -> [Help 1]


Para solucionar este error, leí en un foro que se debe ejecutar en la terminal mvn clean install, pero luego de hacerlo me aparecía el siguiente error (el cual tampoco pude solucionar):

failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) there are test failures

La verdad no sé a que se deben los errores, creo que es un problema de versiones de maven.

Les comparto más detalles del proyecto así me ayudan.

POM

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?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.7.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.matias</groupId>
    <artifactId>almacendemo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>almacendemo</name>
    <description>Demo de proyecto sistema de ventas para almacen</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</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-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity5</artifactId>
        </dependency>
 
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
 
</project>

*************

APPLICATION.PROPERTIES ***********

1
2
3
4
5
6
7
8
spring.datasource.url: jdbc:mysql://localhost:3306/almacen?allowPublicKeyRetrieval=true&useSSL=false&useTimezone=true&serverTimezone=GMT&characterEncoding=UTF-8
spring.datasource.username: root
spring.datasource.password: root
spring.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
spring.jpa.show-sql: true
spring.jpa.hibernate.ddl-auto: update
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.MySQL5InnoDBDialect
spring.thymeleaf.cache: false


MAVEN VERSION


MAVEN INSTALADO EN NETBEANS

CARACTERÍSTICAS DEL PROYECTO

VARIABLES DE ENTORNO



MAVEN VERSION
E4
MAVEN INSTALADO EN NETBEANS
E3
CARACTERÍSTICAS DEL PROYECTO
E1
VARIABLES DE ENTORNO
E2

Desde ya, muchas gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder