How do Jenkins agents get tools like Maven, JDK or Node installed?

IntermediateConceptJenkins
Answer

Three ways: pre-bake tools into the agent image or VM (best, reproducible); use the tools { maven 'M3'; jdk 'jdk21' } directive with Global Tool Configuration auto-installers (slower, installs on demand); or run steps inside tool containers via agent { docker { image ... } } or Kubernetes pod containers. We favour containers so each repo declares its own toolchain version in the Jenkinsfile.

All CI/CD questions

More on Jenkins