Build Tools
Build tools automate compiling, testing, packaging, and deploying Java applications. Maven and Gradle are the two dominant choices in the Java ecosystem. Spring Boot defaults to Maven's plugin model; Gradle is increasingly preferred for large multi-module projects due to its incremental build performance and Kotlin-DSL.
What You'll Find Here
Notes are being added. Planned topics:
| Topic | Description |
|---|---|
| Maven Basics | POM structure, lifecycle phases (compile, test, package, install, deploy). |
| Maven Dependency Management | Coordinates (groupId:artifactId:version), scopes, BOMs (dependencyManagement). |
| Maven Plugins | spring-boot-maven-plugin, Surefire (tests), Failsafe (integration tests). |
| Gradle Basics | build.gradle.kts, tasks, dependency configurations, Gradle wrapper. |
| Maven vs. Gradle | Build speed, configuration style, multi-module project support. |
| Spring Boot with Maven/Gradle | Executable JAR packaging; building Docker images with Buildpacks. |
Learning Path
- Maven Basics — POM structure and the
clean installlifecycle are must-know fundamentals. - Maven Dependency Management — understand transitive dependencies and how BOMs (
spring-boot-dependencies) pin versions. - Gradle Basics — Kotlin DSL is the current default for new Gradle projects; understand task dependency graphs.
- Spring Boot Plugins —
spring-boot:build-imageand the repackage goal are the Spring-specific must-knows.
Related Domains
- Spring Boot — Spring Boot starters and parent POM (
spring-boot-starter-parent) are Maven-centric. - Docker —
mvn spring-boot:build-imageproduces Docker images without a Dockerfile. - DevOps — CI/CD runs
mvnorgradlecommands in pipelines.