Interview Prep/CI/CD/Build Tools and Artifact Repositories

How do Maven dependency scopes and transitive dependencies work?

IntermediateConceptBuild Tools and Artifact Repositories
Answer

Scopes: compile (default, everywhere), provided (needed to compile, supplied at runtime by the container), runtime, test, system, and import (for BOMs in dependencyManagement). Transitive dependencies are pulled in automatically; conflicts are resolved by "nearest definition wins". Inspect with mvn dependency:tree and exclude or manage versions via <dependencyManagement>.

mvn dependency:tree -Dincludes=com.fasterxml.jackson.core
All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools and Artifact Repositories