skip to content

Build Tools

The build systems and compilers that turn sources into artifacts: task graphs, dependency resolution, caching, packaging, and reproducibility across JVM and native ecosystems. Interviewers ask because nothing ships, tests, or debugs without someone understanding the build.

on this pageshow

explore

questions

1,663 · 2 sections

How do you inspect the full dependency graph of a Maven project, and what does dependency:tree show you?

level: juniorimportance: must knowfreq 80%
basics
~10 s

Run mvn dependency:tree. It prints every dependency your project pulls in, including transitive ones, as an indented tree showing which dependency brought in which, plus the scope and version of each.

open as a page

What are the dependency scopes in Maven, and what is each one used for?

level: juniorimportance: must knowfreq 85%
basics
~20 s

Maven has six scopes: compile (default, everywhere), provided (compile/test only, supplied at runtime by the container), runtime (not for compiling, needed to run), test (only for tests), system (like provided but you give a local jar path), and import (only for BOMs in dependencyManagement).

open as a page

What are transitive dependencies in Maven, and where do they come from?

level: juniorimportance: must knowfreq 75%
basics
~10 s

Transitive dependencies are the dependencies of your dependencies. If you declare library A and A needs B, Maven automatically downloads B too, so you don't have to list it yourself.

open as a page

What does the <dependencyManagement> section in a pom.xml do, and how is it different from a plain <dependencies> section?

level: juniorimportance: must knowfreq 75%
basics
~20 s

<dependencyManagement> declares versions (and other settings) centrally but does NOT add the dependency to the build. Child modules that list the same dependency without a version inherit the managed version. Plain <dependencies> actually pulls the jar onto the classpath.

open as a page

What is a Maven archetype, and how do you use archetype:generate to scaffold a new project?

level: juniorimportance: must knowfreq 55%
basics
~10 s

An archetype is a project template. You run mvn archetype:generate, pick a template, and answer prompts for groupId, artifactId and version; Maven creates a ready-to-build project skeleton from that template.

open as a page

What is the Gradle Worker API, and why would a custom task use it instead of just running its work directly in the task action?

level: juniorimportance: must knowfreq 55%
basics
~20 s

The Worker API lets a task hand units of work to Gradle's worker pool so they run in parallel. You inject WorkerExecutor, define a WorkAction, and submit work to a queue. It enables parallelism and isolation that a plain task action can't get.

open as a page

What does Property.convention(...) do on a Gradle lazy property, and how does it differ from calling set(...)?

level: juniorimportance: must knowfreq 62%
basics
~10 s

convention(...) supplies a default value used only if nobody calls set(...). set(...) is an explicit assignment that overrides any convention. So convention = fallback default, set = the actual chosen value.

open as a page

What is a Gradle DSL extension, and how do you register one from a plugin so users can configure your plugin in their build script?

level: juniorimportance: must knowfreq 70%
basics
~10 s

An extension is an object added to a project that exposes a configuration block (DSL). A plugin registers it with project.extensions.create("myExt", MyExtension::class.java), then users configure it via a myExt { ... } block.

open as a page

What is a NamedDomainObjectContainer in Gradle, and why would a plugin author expose one in their extension?

level: juniorimportance: must knowfreq 55%
basics
~10 s

It's a Gradle collection of objects each identified by a unique name. Plugins expose one so users can declare multiple named instances in a DSL block, like sourceSets or configurations.

open as a page

Your plugin defines an extension with a `Property<String>` called `greeting`. How do you connect that extension value to a task's input property so the task uses whatever the user sets in the build script?

level: juniorimportance: must knowfreq 60%
basics
~10 s

Use task.greeting.set(extension.greeting). This wires the task's Property to the extension's Property lazily, so the value is read later (at execution), not while configuring.

open as a page