If not already done so, obtain a local install of Maven for your development environment. For instructions on how to install and build maven please refer to the documentation posted at Requirements. If all goes well, you should be able to open a command prompt window, and at the command prompt, type 'mvn -version'.
You should see a message similar to below, displaying the version of Maven and Java.
Depending on you comfort level there may be more Maven configuration tricks that you may want to perform, such as customizing your settings.xml file. Look at the Additional References section below for more tutorials on Maven configurations that you may find helpful.
Creating the Maven Project in Eclipse using archetypes
There are probably various ways to create a maven project but I found this one very simple at creating a basic maven structured project using archetypes.
You will need to install the Eclipse IDE Maven plugin found at the Eclipse Marketplace
Step 1. Create a New Maven Project
- Click 'File' -> 'New' -> 'Other' -> 'Maven Project' and then click 'Next'.
Step 2. Select project name and location.
Use the default Workspace location or specify the location if necessary.
Step 3. Select an archetype
Select the maven-archetype-quickstart archetype from the list. It's a simple Maven web structure that will help get you started.
Step 4. Enter the Group id and Artifact Id
Enter the Group Id and Artifact Id and click 'Finish'
Step 5. Your New Maven Project
Below is what your sample structure looks like after you perform all the steps. This should help as a starting point.