Steps to configure maven in Eclipse
Once you installed Maven integration plugin in eclipse you need to do some configuration.
Step 1: go to windows and click on preferences
Step 2: go to the Maven and Select archetype and click on add Remote catalog.
Step 3: Give remote catalog path
Catalog file: http://repo.maven.apache.org/maven2/archetype-catalog.xml
Note: you can add local catalog or Remote catalog.
local represents the ~/.m2/archetype-catalog.xml catalog file.
Remote represents the http://repo.maven.apache.org/maven2/archetype-catalog.xml catalog file.
Step 4: Click on Ok to add Remote catalog.
Step 5: Go to installation and click on add
Step 6: Give your maven Installation path and click on finish
Step 7: Select Maven and Click ok
Step 4: Now go to the User Setting and Give path of your setting.xml file.
That’s it Now you can start with your first maven project.
Creating Maven project in Eclipse
Step 1: Click on file and select new and click on Maven Project
Step 2: Select default and click on next
Step 2: Under filter Search for Archetype j2ee to create simple web app.
Eclipse will Retrieve available archetype
Step 3:To create simple webApp select webapp-j2ee
Step 4:Define group id and Artifact id(Project name) and click on finish
Step 5:Eclipse automatically create project structure Based on Archetype.
Step 6: You can run index.jsp file to check everything working fine.
Step 7: Accessing index.jsp file
Step 8:Now you if will check libraries you can see maven dependency and
inside you can see required jar file,which you need to define in pom.xml file.
once you add dependency in pom.xml it will automatically download required jar file.