What is a Build Tool

Why Not Just javac?

A real Spring Boot project uses 50 to 150 libraries (jars): Spring itself, Tomcat, Jackson, logging, the database driver and their own dependencies. Downloading them by hand and keeping their versions compatible is impossible. A build tool does it for you.

  • Dependency management: you list what you need; it downloads the jars (and their dependencies) from Maven Central.
  • Build lifecycle: compile, run tests, package into a jar, with one command.
  • Standard project layout: every developer and every CI server builds the project the same way.

Maven vs Gradle

MavenGradle
Build filepom.xml (XML)build.gradle (Groovy) or build.gradle.kts (Kotlin)
Styledeclarative, fixed lifecyclescriptable, flexible tasks
Speedgoodfaster on big projects (incremental builds, build cache)
Popular inmost Spring Boot backends, enterprise and service companiesAndroid (always), many product companies
Wrappermvnwgradlew

Tip: Learn Maven first: it is what most Spring Boot job projects use. Gradle concepts map one to one.