Create a Maven Project in Eclipse utilizing Java

What is Maven?

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. 

We can manage java project builds very easily using maven. Maven can help you to minimize your project and build management time and efforts.

Why to use Maven?

  • It makes project build process easy.
  • It provides uniform builds.
  • Managing project dependencies is easier and common for all developers in a team
  • Facilitate easy and transparent migration to new features.
  • It allows to build project using project object model (POM).
  • It downloads required dependency's jar files automatically from Maven central repositories.

How to use Maven in a Java Project?

  • Java should be installed on system.
  • IDE eg. Eclipse/Intellij should be installed on system
  • Create project using maven-archetype-quickstart template
  • Include the required dependency

You can get more information on the official Maven website.

Steps to create a Maven project in Eclipse.

Open the Eclipse IDE.

Click on File -> New -> Project



Select a Maven Project, and click on Next.




Leave the default settings and click Next.




Select the archetype as maven-archetype-quickstart, and click on Next.



Enter a Group ID and Artifact ID, and click Finish.



Wait for the Project to be built.




The Project is created with a predefined Hello World template!



Let's run it to see if it works!

Click on Run button. 



You can see Hello World! printed in the console window below!!


So, finally we have successfully created a Maven Project in Java using Eclipse IDE!!


Thanks for Reading the Article. If you have reached this far, we hope that the article was useful to you! Please Like/Share/Follow us on FacebookTwitterTumblr.


Comments

Popular posts from this blog

Calculate Your CTC Salary Hike Percentage - Online Calculator to find your New Salary

Find the Longest Streak of 1's in a Binary Array using Java Code

Java Program to read Excel File and Load into Array

Java Program to Read a Properties file and return a Property Value

4 ways to add New Line Character to a String in Java