Creating a Maven Project in Eclipse

Introduction

This is a quick guide to creating a basic maven project in Eclipse. In general, this should be the very first step for all of your projects that require creating anything based on Maven and Java(of course).

New Project Wizard

Go to File → New → Project and create a Maven project

On the next screen, select maven quickstart acrhetype

Fill in the details as shown:
Group Id: com.codecramp
Artifact Id: jpa
Rest will be populated automatically.


Click finish and you’ll have a sample hello world project in Eclipse IDE.

Project Structure

It should look something like:

Verification

To verify that everything this is working fine you need to do two things:

  1. right click the project and click Run As → Maven install, the build should be successful.
  2. right click App.java and click Run As → Java Application, you should see Hello World! on the console.