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 pageshowhide
explore
- Maven250 questions
- Project Object Model21 questions
- Build Lifecycle & Invocation16 questions
- Dependency Management22 questions
- Plugins & Goals32 questions
- Profiles & Configuration21 questions
- Testing & Code Quality27 questions
- Packaging & Assembly26 questions
- Multi-Module Reactor21 questions
- Repositories, Release & Publishing29 questions
- Execution Environment & Performance19 questions
- Supply Chain & Security16 questions
- Gradle1,413 questions
- Build Scripts and DSL85 questions
- Tasks and Task Graph103 questions
- Dependency Management179 questions
- Plugins72 questions
- Multi-Project Builds100 questions
- Build Cache and Performance146 questions
- Lifecycle and Execution Model93 questions
- Authoring Plugins, Tasks and Extensions186 questions
- Testing Integration111 questions
- Publishing and Artifacts95 questions
- Wrapper, Distribution and Build Environment115 questions
- Tooling and IDE Integration66 questions
- Ecosystem and Interop62 questions
- Bazelempty
- CMakeempty
- Variables and Cacheempty
- Dependency Discoveryempty
- Install and Exportempty
- Make / Makefileempty
- Ninjaempty
- GCCempty
- MSVCempty
questions
1,663 · 2 sectionsHow do you inspect the full dependency graph of a Maven project, and what does dependency:tree show you?
basics
~10 sRun 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.
What are the dependency scopes in Maven, and what is each one used for?
basics
~20 sMaven 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).
What are transitive dependencies in Maven, and where do they come from?
basics
~10 sTransitive 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.
What does the <dependencyManagement> section in a pom.xml do, and how is it different from a plain <dependencies> section?
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.
What is a Maven archetype, and how do you use archetype:generate to scaffold a new project?
basics
~10 sAn 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.
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?
basics
~20 sThe 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.
What does Property.convention(...) do on a Gradle lazy property, and how does it differ from calling set(...)?
basics
~10 sconvention(...) 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.
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?
basics
~10 sAn 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.
What is a NamedDomainObjectContainer in Gradle, and why would a plugin author expose one in their extension?
basics
~10 sIt'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.
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?
basics
~10 sUse 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.