Toolkit: IDEs, mvnd, Develocity & Plugins
The build tools are only half of a JVM build engineer's kit. This lesson tours the companions: the IDE integration you'll use every day, faster front ends, the observability layer, and the plugins that keep dependencies healthy. Only the built-in diagnostics run in this course's offline sandbox; the rest are shown as sample commands.
Built-in diagnostics you already have
Two commands answer "where does this setting come from?" without any extra tool. Maven's effective POM with -Dverbose annotates every line with its source (your POM, a parent, the Super POM, the default lifecycle bindings), and Gradle's javaToolchains shows which JDKs it found and how:
mkdir p && cd p
cat > pom.xml <<'POM'
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>p</artifactId>
<version>1.0</version>
<properties><maven.compiler.release>21</maven.compiler.release></properties>
</project>
POM
mvn -q -o help:effective-pom -Dverbose -Doutput=effective.xml
grep -E 'maven.compiler.release|<directory>.*target|artifactId>maven-compiler' effective.xml | sed 's/^ *//'
echo 'rootProject.name = "p"' > settings.gradle.kts
echo 'plugins { java }' > build.gradle.kts
gradle -q javaToolchains | sed -n '/^ + Eclipse/,/Detected by/p'<maven.compiler.release>21</maven.compiler.release> <!-- com.example:p:1.0, line 6 -->
<directory>/home/learner/p/target</directory> <!-- org.apache.maven:maven-model-builder:3.9.16:super-pom, line 51 -->
<artifactId>maven-compiler-plugin</artifactId> <!-- org.apache.maven:maven-core:3.9.16:default-lifecycle-bindings -->
+ Eclipse Temurin JDK 21 (21.0.13+9-LTS)
| Location: /opt/java
| Language Version: 21
| Vendor: Eclipse Temurin
| Architecture: amd64
| Is JDK: true
| Detected by: Current JVM
Other built-ins worth knowing: mvn help:active-profiles, mvn dependency:tree -Dverbose, mvn -X (debug log); gradle dependencyInsight, gradle buildEnvironment (the build's own classpath), gradle --info/--debug, gradle --profile (an offline HTML timing report in build/reports/profile/), and --scan (below).
IntelliJ IDEA (and other IDEs)
IntelliJ imports both build tools natively: open the folder containing pom.xml or settings.gradle.kts, and the IDE runs the tool to read the model.
- Maven tool window: lifecycle phases and plugin goals as double-clickable items, profile checkboxes, Show Dependencies (a graph of the tree with conflicts highlighted).
- Gradle tool window: tasks grouped as in
gradle tasks, Reload All Gradle Projects after you edit a build script, and the setting Build and run using: Gradle vs IntelliJ IDEA (Gradle is slower for small edits but matches CI exactly). - Kotlin DSL support: completion and navigation in
build.gradle.kts(jump into Gradle's API sources), which is the main reason to prefer it over Groovy. - Use the wrapper: set the IDE to use
gradle-wrapper.properties/mvnwand the project's JDK, so "works in the IDE" means "works in CI".
Eclipse (Buildship for Gradle, m2e for Maven) and VS Code (the Java extension pack) offer the same basics.
Maven Daemon (mvnd)
mvnd is Apache Maven's answer to the Gradle Daemon: a native client talking to a long-lived Maven JVM that keeps plugins loaded and JIT-compiled, and it builds modules in parallel by default. It is a drop-in replacement for mvn (same POMs, same options):
$ mvnd -v # sample, shortened: mvnd 1.x embeds a Maven 3.9.x
Apache Maven Daemon (mvnd) 1.x linux-amd64 native client (…)
$ mvnd verify # first build: starts a daemon
$ mvnd verify # later builds: noticeably faster on multi-module projects
$ mvnd --stop # stop daemonsIt speeds up the Maven part of the work; it doesn't add up-to-date checks, so tests still run every time. Use it locally; CI usually keeps plain ./mvnw, where a fresh JVM per build is a feature.
Develocity and build scans
Develocity (formerly Gradle Enterprise) is Gradle Inc.'s commercial server for build observability and acceleration, for both Gradle and Maven: build scans (a shareable web page per build with the timeline, task/goal durations, test results, dependency resolution, environment), a remote build cache, flaky-test detection, failure analytics across all CI builds, and predictive test selection.
$ ./gradlew build --scan # sample: needs network and accepting the terms of use
…
Publishing build scan...
https://gradle.com/s/abcd1234efgh5Without a Develocity server, --scan publishes to the free public scans.gradle.com service after you accept its terms; never do that for a private codebase without permission, because the scan contains environment and dependency details. For Maven, the Develocity Maven extension (in .mvn/extensions.xml) provides the same scans. Free alternatives cover parts of it: gradle --profile, the Gradle Build Cache Node or a Bazel-compatible remote cache, and test reports in your CI system.
Dependency hygiene plugins
| Tool | Command (sample) | What it does |
|---|---|---|
| Versions Maven Plugin (MojoHaus) | mvn versions:display-dependency-updates, versions:display-plugin-updates, versions:use-latest-releases |
lists newer versions of dependencies and plugins, and can rewrite the POM |
Gradle Versions Plugin (com.github.ben-manes.versions) |
./gradlew dependencyUpdates |
the same report for Gradle |
| OWASP Dependency-Check | mvn org.owasp:dependency-check-maven:check, Gradle plugin org.owasp.dependencycheck |
matches dependencies against the National Vulnerability Database and fails on CVEs above a threshold |
| Renovate / Dependabot | configured in the repository | open pull requests for updates, reading POMs, Gradle files and version catalogs |
| dependency-analysis-gradle-plugin | ./gradlew buildHealth |
Gradle's dependency:analyze: unused, undeclared, and api that should be implementation |
None of these are installed in this course's sandbox (they need online databases or update metadata), so they appear only as samples here. In practice: let Renovate or Dependabot propose updates, let CI run the vulnerability check, and keep the versions report for planned upgrade days. The Software Supply Chain Security course goes deeper into scanning and SBOMs.
Test yourself
Which command shows, for each line of the effective POM, which POM or default it came from?
- mvn help:effective-pom -Dverbose
- mvn dependency:tree
- mvn -X validate
- mvn help:active-profiles
What does the Maven Daemon (mvnd) speed up?
- It skips tests that haven't changed
- Maven's own start-up and plugin loading, plus parallel module builds; tests still run
- Dependency downloads only
- Nothing on multi-module builds
Why should you not run --scan on a private project without approval?
- It deletes the build cache
- The scan is published to a server and contains details of the build environment and dependencies
- It slows the build tenfold
- It changes the wrapper version