aabarmin / epam-microservices-training-2022

Apache License 2.0
14 stars 15 forks source link

[bug] monolithic-hexagonal app fails to start via Maven #13

Open naXa777 opened 1 year ago

naXa777 commented 1 year ago
working directory monolithic\monolithic-hexagonal
branch main

I'm using the steps from the readme:

All the apps are Spring Boot applications, so, go to the necessary folder and execute the Maven goal:

$ mvn spring-boot:run

But it seems like the app is unhealthy.

Demo

https://github.com/aabarmin/epam-microservices-training-2022/assets/3858548/33738d38-0d26-40f5-875d-77b344ef8c85

Error

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.1.4:run (default-cli) on project monolithic-hexagonal: Unable to find a suitable main class, please add a 'mainClass' property -> [Help 1]

naXa777 commented 1 year ago

I don't think it's a problem with documentation (readme). The expected result is that mvn spring-boot:run command should work for all modules. It seems like a misconfiguration in the monolithic/monolithic-hexagonal module, cause the app itself works fine when running via IntelliJ IDEA runner.

image

image

naXa777 commented 1 year ago

oh... stupid me 😄

monolithic-hexagonal app works when ran correctly:

cd .\monolithic-hexagonal-app\
mvn spring-boot:run