Create Maven Hello World Eclipse

Below I will show you how to create maven Web Application Hello World project in eclipse. Please follow below steps:

Below are needed

  • Eclipse Kepler (Download eclipse from here)
  • To create project using Eclipse you will have to install JBoss Tools plug-in using this tutorial
  • JDK 1.5 or above (Download from here: JDK 1.5 )

Steps:

  • Open your eclipse –> File –> New –> Maven Project ( Note: If don’t see Maven project: Click Other –> Maven –> Maven Project)

Create Maven Hello World Eclipse

  • On next window click Next

Create Maven Hello World Eclipse

  • Choose maven-archtype-webapp –>Click Next

Create Maven Hello World Eclipse

Enter as below:

  • Group Id — Your package structure (You can change later)
  • Artifact Id: Name of your project
  • Version: Leave default selected
  • Package : Enter your package name or copy from group id
  • Click Finish

Create_Maven_Hello_World_Eclipse

  • Once you finish you will see below project structure:

Create Maven Hello World Eclipse

  • Eclipse Kepler automatically create dynamic web module with 2.3 version. To check right click to the project –> Click properties –>Project Facets –>Dynamic web module

Create Maven Hello World Eclipse

  • Now right click project –> Click Properties –> Java Build Path you will it complains 2 build path entries are missing. Let’s create those those two entries to the project

Create Maven Hello World Eclipse

  • Go to your project workspace location and create two folder
    • Folder name: test –>Inside src and folder name java –> inside test
    • Folder name: java –> Inside src/main
  • Refresh your project go to java build path configuration build path entries issue should be resolved now.
  • For test I have use tomcat server. Please configure latest version of tomcat to your eclipse (If you are not sure how to do this use this link: Configure and Run Tomcat server in eclipse)
  • To run it –> Right click project –> Run As –> Run on Server

Create Maven Hello World Eclipse

  • Select server tomcat which you have configured to eclipse –>Click Next

Create Maven Hello World Eclipse

  • Select maven project to as below –> Click Finish

Create Maven Hello World Eclipse

  • You will see below Hello World. That’s it.

Create Maven Hello World Eclipse

Leave a Reply

Your email address will not be published. Required fields are marked *