Stage 6 · Lesson 2 of 8
Maven or Gradle builds
Real Java projects are built with or Gradle rather than by running javac by hand. Both are build tools. They use a standard layout, src/main/java for code and src/test/java for tests.
They download the libraries you declare, compile your code, run the tests and package a , a single file that bundles your compiled code. Maven describes the project in pom.xml, and Gradle in build.gradle or build.gradle.kts. Pick one: Maven is more rigid and predictable, Gradle more flexible.
Commit the wrapper scripts (mvnw or gradlew), so a stranger can run ./mvnw test or ./gradlew test without installing anything. Add target/ or build/ to .gitignore. Declare each once with a fixed version, and learn to read the "cannot find symbol" errors that a missing causes.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with
- GitHub repoFreeProject Based Learning
Community maintained · Beginner
Follow one guided build in your language, then build your own without a guide
Keep handy
Also worth your time
How to present each project: the problem, stack, challenges and results
- Build Your Own XGo deeper
When you want a harder build: a shell, a key-value store or a tiny Git, from scratch