I\'m having something quite peculiar here, my build is successful in maven when I type \"mvn clean install\" however once imported into Eclipse it\'s showing errors.
It may help: After upgrading eclipse or changing it or something like, old eclipse specific files (.classpath, .project, and .settings) may not be compatible to the new version of eclipse. So you may have to re generate this eclipse specific files using Maven. So try this in your eclipse project root
mvn eclipse:eclipse
In my case,
I just deleted project from Eclipse (not ticked checkbox to delete from project location).
Opened project as "Existing Maven Project" again.
and it solved my issue.
Sometimes the m2e "maintained" eclipse project is out-of-sync with the actual project in POM (There are lots of reason for that). Assume you have using m2e 0.8 or later, right click on the project, under Maven, there are two entries that are usually useful. They are Update Dependencies and Update Project Configuration
Have a try on them, wait a while after u clicked that for eclipse to update the project and build. Normally it solves similar problems.
Updating maven project after importing it has fixed this issue for me:
Right click on the project --> Maven --> Update project.
sometimes maven update nor all above works. so check which import statement gives you error, then go particular lib file which is usually in c:user/ur-PC-NAME/.m2 get into package delete that .jar file.
then in eclipse, right click on project > maven > update maven.
For me Right click on the project --> Maven --> Update project with the "Force Update of Snapshots/Releases" checkmarked worked.