Apr 112016

ADM

How to create an application with Maven in Eclipse

  • 11 April 2016
  • ADM

 

 

 

How to create an application with Maven in Eclipse - images/logos/eclipse.jpg

 

This tutorial will follow the steps to create a simple app with maven in Eclipse.

These tools were used here:

  • Apache Maven 3.2.2
  • Java 1.8.0_40
  • Eclipse Mars

Step 1 - New Project

Create a new project from Eclipse by selecting Maven --> Maven Project.

How to create an application with Maven in Eclipse - /images/mavenNewProject1.png

Step 2 - Location

Select the destination location. For this tutorial will use the default Workspace location.

How to create an application with Maven in Eclipse - /images/mavenNewProject3.png

Step 3 - Archetype

Search for the maven-archetype-quickstart, select and click Next.

How to create an application with Maven in Eclipse - /images/MavenElipseApp1.png

Step 4 - Add details

Fill out below details and click Finish.

How to create an application with Maven in Eclipse - /images/MavenEclipseApp3.png

The project structure will look like the following image.

How to create an application with Maven in Eclipse - /images/MavenElipseApp2.png

Step 5 - test

Run the application by pressing the green start button from or Package Explorer view select the java file -> right click -> Run as -> Java Application. The "Hello World!" message should appear in the console.