This week introduces Apache Maven, a build automation and dependency management tool that helps
Java developers organize, build, and maintain projects efficiently.
Students will learn how to use Maven to manage external libraries, set up clean project structures,
and prepare their codebase for frameworks like Spring Boot.
- Maven as a build and dependency management tool
- Benefits over manual
.jarhandling - Maven lifecycle:
clean,compile,package,install
- Creating a Maven project in IntelliJ IDEA
- Understanding the standard folder structure:
src/main/java β source code
src/main/resources β config files
src/test/java β tests
pom.xml β project configuration
- Running Maven goals and commands
- Adding external libraries through the
pom.xmlfile - Using Maven Central Repository
- Common dependencies:
- PostgreSQL (JDBC)
- Gson (JSON)
- OpenCSV (CSV handling)
- SLF4J (logging)
- JUnit (testing)
- Applying a clean, layered architecture:
model/ β Data classes
dao/ β Database access
service/ β Business logic
util/ β Helpers (DB, JSON, etc.)
App.java β Main entry point
- Using
resources/config.propertiesfor DB credentials and settings
By the end of Week 7, students will be able to:
- Understand the purpose and advantages of Maven
- Create and configure Maven projects in IntelliJ
- Add and manage dependencies via
pom.xml - Use Maven commands to compile, package, and run applications
- Structure Java code into modular packages (
model,dao,service,util) - Load configurations from resource files instead of hardcoding
- Apply Maven in small real-world projects (JSON, CSV, JDBC)
| Tool | Purpose |
|---|---|
| IntelliJ IDEA | Create and manage Maven projects |
| Maven | Build automation and dependency management |
| PostgreSQL / MySQL | Database for JDBC projects |
| pgAdmin / DBeaver | Database GUI tools |
| Maven Central | Find and copy dependency code snippets |