how maven works in eclipse?
Just install the m2e plugin for Eclipse. Then a new command in Eclipse's Import statement will be added called "Import existing maven projects". When you add dependency in pom. xml , do a maven clean , and then maven build , it will add the jars into you project.