Maven have a Eclipse plugin and Eclipse have a Maven plugin we are going to discus those things.when we using maven with those command line stuffs and etc when we are going through eclipse we don't want to that command line codes it have very much helpful, Maven and eclipse giving good integration ,they will work very well together thanks for that plugins
Step 1: Go to the maven project. Here my project is FirstApp.(Example my project is FirstApp)
There you can see one pom.xml file, now what we want is to generate an eclipse project using that pom.xml.
Step 2: Use mvn eclipse:eclipse command
Step 3: Verify the project
after execution of this command notice that two new files have been created
Note:- both these files are created for Eclipse. When you open those files you will notice a "M2_REPO" class variable is generate. You want to add that class path in eclipse, otherwise eclipse will show a error.
Step 4: Importing eclipse project
File -> Import -> General -> Existing Projects in Workspace -> Select root directory -> Done
More details here