0

When I am running a basic spring application I am getting this error even though I have wrapper jar in .mvn folder. And also maven updated the project and still getting the class not found exception. I can't figure out where I am making the mistake

And also this error is shown Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.4.RELEASE:run

  • Welcome to SO! Could you please specify how you are starting your application? Have you checked the answers at [this similar question](https://stackoverflow.com/questions/50104172/could-not-find-or-load-main-class-org-apache-maven-wrapper-mavenwrappermain)? – Johannes Stadler Nov 03 '20 at 13:15
  • Yaa I am opening the spring main class and running it as java application..I am sure that the correct main class is running as a java application – CodeFailure Nov 05 '20 at 11:12

1 Answers1

0

You're missing the .mvn folder in your git repository. You should have a folder called .mvn which contains the files wrapper/maven-wrapper.jar, wrapper/maven-wrapper.properties and jvm.config. Perhaps you missed it because it's a hidden folder.

Try doing git add -f .mvn from the command line then commit and push.

Mahesh_Loya
  • 2,743
  • 3
  • 16
  • 28
  • I am executing in the local environment only and there is no jvm.config file...I have .mvn folder with wrapper jar and wrapper properties file – CodeFailure Nov 05 '20 at 11:16
  • Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.4.RELEASE:run and this error is shown when I am running through maven commands..please help me out – CodeFailure Nov 05 '20 at 11:42