17) Maven Essentials (Recommended)
Goal
Use Maven to manage dependencies, compile, and run tests in a repeatable way.
Why Maven?
- Everyone can build the same way
- Easy dependency management
- Standard project layout
Install
Standard layout
src/main/java → production code
src/test/java → tests
Common commands
- Compile:
mvn -q test (also runs tests)
- Run tests:
mvn -q test
Minimal pom.xml ingredients
- Java version
- JUnit 5 dependency
- Surefire plugin (often auto)
If you want, I can scaffold a working Maven sample module in this repo.
Table of contents
- Getting Started: Install, run, and your first program
- Java Basics: types, variables, operators, formatting
- Control Flow: if/switch/loops
- Methods: parameters, return values, overloading
- OOP: classes, objects, encapsulation
- Inheritance & Polymorphism (and when not to use them)
- Interfaces, abstract classes, and design basics
- Exceptions and error handling
- Strings, files, and I/O basics
- Collections: List/Set/Map and Big-O intuition
- Generics (the useful parts)
- Lambdas & Streams
- Dates and time (java.time)
- Testing with JUnit 5 (basics)
- Concurrency: threads, executors, futures
- JVM basics: memory, GC, performance habits
- Build tools: Maven essentials (recommended)
- Next steps: projects to build