Solve Maven Errors in Eclipse or STS in Windows machine

Maven Solution 1: Reset .m2 directory

  • Close your eclipse
  • Delete the .m2 folder from windows user folder “C:\Users\India”
  • Re-run your eclipse.

Maven Solution 2: Clean Maven

  • Open Eclipse
  • Open your Maven project.
  • Right Click on pom.xml
  • Click on properties 5.Copy pom.xml location URL
  • Open cmd
  • Write and paste the pom.xml location in the cmd until before /pom.xml as below, cd C:\Users\X\eclipse-workspace\Your project Name
  • Hit Enter.
  • Run mvn clean commond again.

Maven Solution3: Clean project and update maven

  • Clean project from IDE (Eclipse or STS)
  • Force update maven
  • Right click on project
  • Click on Run As
  • Click on Maven build.
  • Provide Goal: mvn clean install
  • Select checkbox for Skip Tests
  • Click Apply and Run