Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao rodar o comando mvnw clean package

Boa noite galera, estou tentando rodar o meu projeto e está apresentando o seguinte erro, aguem pode me ajudar ?

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   ProjetoSpringApi01ApplicationTests.contextLoads » IllegalState Failed to load ...
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.562 s
[INFO] Finished at: 2021-05-24T21:35:12-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project projetoSpringApi01: There are test failures.
[ERROR]
[ERROR] Please refer to C:\aulas_java_web\workspace-spring\projetoSpringApi01\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
1 resposta
solução!

Oie Renato, tudo bem contigo?

Dentro da sua "pom.xml", adicione a seguinte dependência:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.19.1</version>
</dependency>

Acredito também que você esteja usando o JUnit, se sim, substituia o import import org.junit.Test; por esse import org.junit.jupiter.api.Test;

Veja se resolve, qualquer coisa fico a disposição :)

Bons estudos!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software