Apresenta o seguinte erro:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.316 s
[INFO] Finished at: 2025-01-17T19:55:52-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test (default-test) on project api: Failed to collect dependencies at org.apache.maven.surefire:surefire-junit-platform:jar:3.5.2: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-junit-platform:jar:3.5.2: The following artifacts could not be resolved: org.apache.maven.surefire:surefire-junit-platform:pom:3.5.2 (absent): Could not transfer artifact org.apache.maven.surefire:surefire-junit-platform:pom:3.5.2 from/to central (https://repo.maven.apache.org/maven2): Network is unreachable: getsockopt -> [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/MojoExecutionException
Process finished with exit code 1
Já verifiquei os arquivos properties e .xml e adicionei algumas dicas que foram dadas, mas mesmo assim não funcionou.
Meus arquivos:
spring.application.name=api
spring.datasource.url= jdbc:mysql://localhost/vollmed_api
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=153672
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
server.error.include-stacktrace=never
api.security.token.secret=${JWT_SECRET:111111}
spring.application.name=api
spring.datasource.url= ${DATASOURCE_URL}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=${DATASOURCE_USERNAME}
spring.datasource.password=${DATASOURCE_PASSWORD}
spring.jpa.show-sql = false
spring.jpa.properties.hibernate.format_sql=false
spring.datasource.url= jdbc:mysql://localhost/vollmed_api_test
Todos os testes estão funcionando corretamente e a ApiApplication também