Eclipse needs to know the path to the local Maven repository. Therefore the classpath variable M2_REPO has to be set.
Execute the following command:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
OR
You can also define a new classpath variable inside Eclipse. From the menu bar, select Window > Preferences. Select the Java > Build Path > Classpath Variables page.
Add the variable M2_REPO with path <path-to-your-user-folder>\.m2\repository.
Reference:
http://maven.apache.org/guides/mini/guide-ide-eclipse.html