Please make sure the environment variables M2_HOME, PATH etc are setup.
If not, please refer to the other post on how to setup the environment.
1. Once
the environment is setup, eclipse configurations need to be updated for
Maven.
2. Go to Window
-> Preferences -> Maven-> Installations. Click on Add and
select
the Maven installation home directory.
3. Go to "User
settings" Under "Maven" and
browse the user settings and global settings
point to the settings.xml that
should be present in your <<installation
directory>>\conf folder.
4. Go to
File-> New -> select Maven Project. Select the workspace and
click on Next.
5. It will list down all the archetypes available.
Select the appropriate archetype. Let's say we want to create a quick project
select “maven-archetype-quickstart”
archetype from the list and click on Next
6. In the Next window enter the following details
a.
Group Id: <<com.sample.app>>
//Similar to your package
b.
Artifact Id: <<SampleApp>>
//your project name.
c.
Version: <<0.0.1-SNAPSHOT>>
//versioning used for project.
d.
Package: <<Jar/War>> //when
the packaging is done, it will create the Jar/War with
ArtifactId-Version. In our ex: SampleApp-0.0.1-SNAPSHOT.Jar
The above steps should create a project with name SampleApp.