Maven Simple Java Project using Eclipse

Step # 1

In the Eclipse IDE, navigate to File > New > Other… in order to bring up the project creation wizard.

Step # 2

Scroll to the Maven folder, open it, and choose Maven Project. Then choose Next.

Step # 3

You should choose to Create a simple project . This will create a basic, Maven-enabled Java project. click Next.

Step # 4

Now, you will need to enter information regarding the Maven Project you are creating. You may visit the Maven documentation for a more in-depth look at the Maven Coordinates (http://maven.apache.org/pom.html#Maven_Coordinates).

In general, the Group Id should correspond to your organization name (in.com.sunilos), and the Artifact Id should correspond to the project’s name (TestMavenProject).

If this is a stand-alone project that does not have parent dependencies, you may leave the Parent Project section as is. Fill out the appropriate information, and click Finish.

Step # 5

You will now notice that your project has been created. You will place your Java code in/src/main/java, resources in /src/main/resources, and your testing code and resources in /src/test/java and /src/test/resources respectively.

Step # 6

Open the pom.xml file to view the structure Maven has set up. In this file, you can see the information entered in Step 4. You may also use the tabs at the bottom of the window to change to view Dependencies, the Dependency Hierarchy, the Effective POM, and the raw XML code for the pom file in the pom.xml tab.