How to create an application with Maven in Eclipse
maven
eclipse
maven-archetype-quickstart
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.
Step 2 - Location
Select the destination location. For this tutorial will use the default Workspace location.
Step 3 - Archetype
Search for the maven-archetype-quickstart
, select and click Next.
Step 4 - Add details
Fill out below details and click Finish.
The project structure will look like the following image.
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.