Introduction to Maven
A short tour of what this Maven crash course covers, what you need before starting, and how the lessons build from build tool basics to a Spring Boot project.
Every Java project you will meet in a real company, whether it is a small utility library or a large Spring Boot microservice, is built by a tool. The most widely used of those tools is Apache Maven. When a Jenkins pipeline says "Building with Maven", when a Dockerfile runs mvn package, or when a developer says "pull the latest and run a clean install", Maven is doing the work.
This course takes you from zero to confident with Maven. There are no prerequisites. You do not need to be a Java expert either: we will write only a few small classes, and the focus stays on how Maven builds, tests and packages them.
What you will do in this course
The lessons follow one path, and each one adds a single new idea.
| Step | What you learn | Lesson |
|---|---|---|
| 1 | Why a build tool exists and what Maven automates | Why and what is build tool |
| 2 | Install Java and Maven on Windows or on a Linux VM in AWS | Maven Installation Guide |
| 3 | Generate a Java project from the command line and read its structure | Maven Java Project |
| 4 | Run the goals clean, compile, test and package | Maven Goals |
| 5 | Add libraries as dependencies and see where Maven downloads them from | Maven Dependencies |
| 6 | Read every part of pom.xml and the effective POM | Maven POM.xml file |
| 7 | Work with Maven inside IntelliJ IDEA and Eclipse | Maven in IntelliJ IDE |
| 8 | Understand the full build lifecycle, write unit tests, and build a Spring Boot app | Maven Build LifeCycle Summary |
We will do most things twice: once from the terminal without any IDE, and once inside an IDE. That is on purpose. When you have seen Maven work from a plain terminal, the buttons in IntelliJ and Eclipse stop being magic. They run the same commands you already know.
What you need
- A laptop with Windows, macOS or Linux, or an AWS account where you can launch one small Linux VM
- A JDK (Java 17 or 21 is a good choice in 2026)
- Maven itself, which we install in the next section
- Optional: IntelliJ IDEA Community Edition or Eclipse IDE for the IDE lessons
Which Maven version?
At the time of writing, the current Maven release is 3.10.0 (September 2026), and the 3.9.x line is still supported. The video uses Maven 3.9.11 on Windows and the Amazon Linux package (3.8.4) on the cloud VM. Everything in this course works the same on all of them. Maven 4 is still a release candidate and is not meant for production yet.
How to get the most out of it
Type every command yourself. Maven prints a lot of output, and learning to read that output (which plugin ran, which test failed, which file was produced) is half of the skill. When a build fails, do not skip ahead. Read the [ERROR] lines from the top, find the first real cause, and fix it. That habit will save you hours later when you debug a broken Jenkins pipeline.
At the end of the course there is a wrap-up with a one-page summary of every command and concept, so you can revise quickly.
Try It Yourself
- Open a terminal and run
java -version. Note whether Java is installed and which version you have. - Run
mvn -v. If it prints "command not found", that is fine, you will install Maven in the next section. - Pick your practice environment now: your own machine or an AWS EC2 Linux VM. Stick with it for the whole course.
Official references
Written By: Shramik Masti
How is this guide?
Last updated on
Introduction
Why Apache Maven exists, how pom.xml, plugins and repositories work together, the core Maven vocabulary, and where Maven fits with Git, Docker, Jenkins and the rest of the DevOps toolchain.
Why and what is build tool
Understand the steps between writing Java code and running it on a server, why doing them by hand does not scale, and how a build tool like Maven automates both building and dependency management.
