Building a Java Project with Maven

Last Updated : 8 Apr, 2026

Apache Maven helps in efficiently building and managing Java projects by handling dependencies and project structure. Using Spring Tool Suite, developers can easily create and build Maven-based applications with minimal setup.

  • Simplifies dependency management and project configuration
  • Enables quick project setup using Spring Tool Suite
  • Provides a structured approach to build Java applications

Tools and Technologies

  • Java Programming
  • Java Version 17
  • Maven 3.X
  • Spring Tool Suite

Steps to Build a Java Project with Maven

Here, we created a simple maven project with required maven dependencies and we mention them below.

Step 1: Create Project on Spring Tool Suite

  • First, open your Spring Tool Suite.
  • After that click on file menu option.
  • Then select new option and then select Spring Starter project.
Create Project

Step 2: Enter Details

Now, a new window is opened. In this window, we nee provide information project like versions, language, package name, artifact id and other information. Here, we select language as java, project type is maven and provide package and artifact id.

Project Metadata

Step 3: Add Dependencies

Now, click on next button, then a new window is opened. Here, we need to select required project dependencies based on project requirement.

Project Dependencies

Step 4: Review Information

Now, click on next button a new window is opened. In this window, the STS shows information about maven dependency download information.

Dependency download Information

Step 5: Finish Setup

Now, click on finish button. After this, it take some time create a maven project. The maven dependency management download the selected dependencies.

Project Creating

Step 6: View Structure

Once required project dependencies are download into local machine, then maven creates a standard project folder structure. Below we mention the example project folder structure.

Project Folder Structure

Step 7: Run Project

Now, develop the application based your business login run this project and this project runs on tomcat server with default port number 8080.

Application Running
Comment
Article Tags:

Explore