06 · Maven from first build to release / LESSON 23 OF 102
Build plugins, compiler release, and reproducibility
Build plugins execute the build; library dependencies supply application APIs.
Before this lesson: Dependency management, BOMs, and version conflicts
Understand the topic
Configure the compiler release to target a Java platform API as well as bytecode. source and target alone may allow accidental use of newer JDK APIs. Pin plugin versions, choose a known JDK, and keep generated timestamps out of artifacts when reproducibility matters.
pluginManagement provides defaults but does not generally activate a plugin by itself. A plugin under build/plugins is an execution participant. In a Boot project the parent already manages many plugin versions, so inspect the effective POM before duplicating configuration.
EXAMPLE · XML
pom.xml properties fragment
<properties>
<java.version>21</java.version>
<maven.compiler.release>21</maven.compiler.release>
<project.build.outputTimestamp>2026-01-01T00:00:00Z</project.build.outputTimestamp>
</properties>What to expect
In a Boot-parent build these properties set the Java baseline and a fixed archive timestamp for plugins that support it.
YOUR TURN
Put it into practice
- 01Build twice from the same commit and compare artifact hashes.
- 02Inspect differences caused by timestamps, generated files, or toolchain versions.
- 03Verify: The build documents its JDK and plugin inputs and explains any remaining nondeterminism.
Pass a quiz or complete a lab to check today’s streak. Each lesson counts once per day, including when you review it later.
UNDER THE HOOD
Build the mental model
Build plugins execute the build; library dependencies supply application APIs.
- 01Configure the compiler release to target a Java platform API as well as bytecode. source and target alone may allow accidental use of newer JDK APIs. Pin plugin versions, choose a known JDK, and keep generated timestamps out of artifacts when reproducibility matters.
- 02pluginManagement provides defaults but does not generally activate a plugin by itself. A plugin under build/plugins is an execution participant. In a Boot project the parent already manages many plugin versions, so inspect the effective POM before duplicating configuration.
- 03Trace the example: In a Boot-parent build these properties set the Java baseline and a fixed archive timestamp for plugins that support it.
A mistake worth avoiding
Code builds on a newer JDK but fails to compile in CI.
DEBUGGING ROOM
Something broke. Where do you look?
Code builds on a newer JDK but fails to compile in CI.
Before revealing the diagnosis, write down your first investigation step.
CHECK YOUR UNDERSTANDING
Is a compiler plugin the same as an application dependency?
BUILD IT YOURSELF
Build twice from the same commit and compare artifact hashes.
- 1.Build twice from the same commit and compare artifact hashes.
- 2.Inspect differences caused by timestamps, generated files, or toolchain versions.
- 3.Reproduce this failure, then repair it: Code builds on a newer JDK but fails to compile in CI.
Acceptance checklist
Lab completion is your self-report. Knowledge checks do not certify project quality.
RETRIEVE IT FROM MEMORY
Is a compiler plugin the same as an application dependency?
Revisit this lesson in three days after a successful check or lab.
Ready for the next step?
The build documents its JDK and plugin inputs and explains any remaining nondeterminism.
Reading is separate from passing a knowledge check or completing a lab.