funnyguy
funnyguy

Reputation: 13

Unable to find a suitable main class, please add a 'mainClass' property -wrong classpath maybe?

I receive the above error when running mvn spring-boot:run more specific mvn spring-boot:run error after some research i found out that i have to specify the main class inside pom like this pom property-start-class the path of my mainclass is:path and i still get this error:exception am i doing something wrong with the classpath?

Upvotes: 1

Views: 325

Answers (2)

Sunil
Sunil

Reputation: 374

Nothing wrong with mvn spring-boot:run

However if you are getting an error, just run mvn clean install first

Upvotes: 0

undertale
undertale

Reputation: 452

you can run this command from the root project:

mvn clean package spring-boot:repackage 

Upvotes: 3

Related Questions