Your ultimate guide

Creating a Simple Maven Project in Eclipse (Step-by-Step Guide)

🧰 Pre-Requisites (What You Need Before Starting)

  1. Java JDK Installed
    • Download and install the latest Java JDK from the official Oracle website.
    • Ensure the `JAVA_HOME` environment variable is set correctly.
  2. Eclipse IDE Installed
    • Install the latest version of Eclipse IDE for Java Developers from official Eclipse website.
  3. Internet Connection
    • You’ll need an active internet connection during the setup to download dependencies and plugins.
  4. TestNG Plugin (Optional, if using TestNG in Maven project)




🚀 Steps to Create a Simple Maven Project in Eclipse
1. Open Eclipse IDE
2. Start a New Maven Project
    Go to: File → New → Maven Project
    (If you don’t see "Maven Project", go to `File` → `Other`, then search and select "Maven Project")



3. Project Configuration Window

  • Leave the default settings (location and working set) as-is.
  • Don’t check the “Create a simple project (skip archetype selection)” option.
  • Click Next.


4. Select a Project Template (Archetype)

  • Eclipse will take a few moments to load archetypes (templates).
  • In the "Filter" box, type: `maven-archetype-quickstart`.
  • Select this option from the list and click Next.


5. Enter Project Details
  • Fill in the following fields:
  • Group Id – your project group name (e.g., com.example)
  • Artifact Id – your project name (e.g., my-first-project)
  • Package – base package name (usually same as Group Id)
  • Click Finish.


6. Project Creation in Progress
  • Eclipse will download required files. This may take a minute.
  • In the Console, if it asks “Confirm properties configuration”, just type `Y` and press Enter.

✅ Your Maven project is now created! You’ll see a standard Maven folder structure in your Project Explorer:



No comments:

Post a Comment