Java files in standard directory
DevOps & Tooling / Knowledge library
Apache Maven
pom-based java builds conventions and lifecycles
Why learn Apache Maven?
Useful for consistent Java project builds. Dependency mediation and plugin versions should be inspected rather than left implicit.
Where it came from
Apache Maven uses a project object model and conventions to manage builds, dependencies, and project information. Lifecycle phases coordinate common build activities.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Read a project's POM and identify its coordinates.
- Run tests through the build lifecycle.
- Inspect the dependency tree.
- Pin a build plugin version.
- Package and test the artifact outside the source tree.
Documentation and sources
- Official documentation (maven.apache.org)
Catalog research notes
- Research snapshot: September 9, 2026. This entry summarizes the linked primary documentation; it does not assert a latest release version.
Connect the ideas
Alternatives
Explore next
Real World Example
Standardizing Distributed Microservices Builds
A financial services firm managing fifty distinct Java microservices developed by independent teams.
The business problem
Teams currently use fragmented, custom build scripts, leading to inconsistent dependency versions, difficult onboarding for new developers, and manual, error-prone release processes.
How this topic solves it
Implementing Apache Maven provides a uniform build system using the Project Object Model (POM), which enforces a standard directory structure and lifecycle, ensuring all projects follow identical build and dependency management conventions.
- Define a parent POM to centralize dependency versions and plugin configurations across all microservices.
- Adopt the standard Maven directory layout (src/main/java, src/test/java) for every microservice repository.
- Configure the standard Maven build lifecycle phases (validate, compile, test, package, verify, install, deploy) to automate testing and artifact generation.
- Utilize Maven's transitive dependency management to automatically resolve and update library versions from a central repository.
This diagram illustrates how Maven processes a project through standardized lifecycle phases.
Check project and build classes
Execute unit tests
Create JAR or WAR file
Publish to repository
- Source Code → input → Validate/Compile
- Validate/Compile → success → Test
- Test → success → Package
- Package → success → Deploy
Expected business outcome
Developers can switch between microservice projects without learning new build systems, and the organization achieves consistent, reproducible build artifacts across the entire portfolio.
Limitations and checks
Maven's opinionated structure can be rigid; if a legacy project requires a highly non-standard build process that cannot be reorganized, the team may have to forgo specific Maven features or abandon the tool for that specific project.