Firstly, let's be sure Maven is correctly installed in your machine.
Basically, check from any command line if everything is correct, simply running: mvn -version
You can firstly try to build your project from command line, getting to the folder containing the project and opening a command line to it.
Once you are from the command line in your maven project, then you can run:
mvn clean install
Then let's also make sure everything is correctly set-up in Eclipse.
- From Window > Preferences > Maven > Installations, check whether it point to the installation you just verified above
- I also suggest, once in the Maven Eclipse settings, to go to User Interface > check option "Open XML page in the POM editor by default"
If everything is fine, then make sure to also run right click on the project > Maven > Update projects.. to be sure Eclipse and Maven are in synch concerning dependencies and settings.
If you are still encountering issues, you could then:
- Right click on the project > Maven > Disable Maven Nature, then right click on the project > Configure > Convert to Maven Project
- Alternatively, from the command line, run
mvn eclipse:eclipse
, then refresh the project on Eclipse