Skip to content

VOL 00 / CH 05 / LESSON 04

5.4 Dependency and Build Tool Quick Reference ​

Type: Reference page, no required sequential reading

Scope: Python/pip, npm, Maven, and Gradle; specific versions depend on the project's Wrapper and CI setup

This page is for locating commands and does not replace the project's own README or Wrapper.

Ecosystem Comparison ​

EcosystemManifestLock/Lock StatusProject-Level EntryDependency Check
Python/pippyproject.toml, requirements inputGenerated by the selected toolpython -m pippip inspect, pip check
npmpackage.jsonpackage-lock.jsonnpm run, npm cinpm ls, npm explain
Mavenpom.xmlNo default full lock./mvnwdependency:tree, help:effective-pom
Gradlebuild.gradle(.kts)Optional gradle.lockfile./gradlewdependencies, dependencyInsight

Maven and Gradle ​

GoalMavenGradle
Clean verification./mvnw clean verify./gradlew clean check
Packaging./mvnw package./gradlew build
Dependency tree./mvnw dependency:tree./gradlew dependencies
Single sourcedependency:tree -Dincludes=GROUP:NAMEdependencyInsight --dependency NAME --configuration runtimeClasspath
Tool version./mvnw --version./gradlew --version

Maven's build lifecycle is a sequence of phases; Gradle's build is a task graph. Gradle can execute appropriate tasks in parallel or incrementally, and Maven also has parallel build options. You cannot generalize the real performance as "one sequential, one parallel."

Installation and Rebuilding ​

bash
# Python: activate the virtual environment first
python -m pip install -r requirements.txt
python -m pip check

# npm: the lockfile must match the manifest
npm ci
npm ls --all

# Maven / Gradle
./mvnw clean verify
./gradlew clean build

Choose the command group for your project after checking that its manifests, Wrapper, and tools exist; these four groups are not a single script. npm ci first removes an existing node_modules directory and runs applicable lifecycle scripts by default.

These commands may contact the repositories configured by the project. Maven -o, Gradle --offline, and npm --offline will fail when local artifacts or caches are missing. Offline installation of pip requires preparing a local wheel or source directory, such as python -m pip install --no-index --find-links=./wheelhouse -r requirements.txt; --no-index itself does not turn caches into complete software sources.

Git Tips ​

Commit manifests, lockfiles or lock state, wrappers, and required shared configuration. Ignore .venv/, node_modules/, target/, .gradle/, and build/. IDE directories are handled according to team-level rules.

Official Verification Entry ​

→ Open Comprehensive Experiment

Built with VitePress | Software Systems Atlas