Scrivio Interview library
ScenarioAdvanced7 min read · updated 12 November 2026

You are responsible for the build platform for 600 Maven projects. Make the plan for adopting Maven 4: when, in what order, and with which safeguards.

Wait for a stable Maven 4 release and the updated versions of the plugins we rely on, tracked in a compatibility list. Run Maven 4 as an extra, non-blocking CI job on a representative set of projects, then upgrade the shared parent and plugin versions so they work on both Maven 3 and 4. Switch the Maven wrapper per repository through automated pull requests, starting with low-risk projects, and only adopt the 4.1.0 model features once the whole fleet is on Maven 4, because they change the build POM format.

Why this question is asked

A build tool upgrade across 600 projects is a migration where the cost of a mistake is multiplied by 600. Done well, most teams barely notice; done badly, the platform team spends months on emergency fixes and teams lose trust in central changes. Interviewers ask this to see whether we can sequence an upgrade so that every step is safe and reversible. In this answer, we will decide when to start, build a compatibility list, find failures with a shadow CI job, prepare the shared parent, switch wrappers in waves, and only at the end adopt the new POM model.

1Decide When: Stable Release and Ready Plugins

The first question is timing. A build tool sits under every build, so we do not adopt release candidates fleet-wide. We wait for a stable Maven 4 release, and just as important, for released versions of the plugins we depend on that declare Maven 4 support.

So we start with a compatibility list. From the fleet inventory, we extract every plugin used across the 600 projects with its versions, which is usually a long tail: 20 common plugins used everywhere and 80 rare ones used by a few builds. For each, we record whether a version compatible with Maven 4 exists, whether it also works on Maven 3, and who uses it. The list tells us when we are ready and which teams need help.

Part of a plugin compatibility list
PluginProjectsMaven 4 ready versionStatus
maven-compiler-plugin600Recent 3.x releaseReady, managed in parent
maven-surefire-plugin590Recent 3.x releaseReady, managed in parent
frontend-build-plugin (example)45Next minor releaseWaiting
old internal codegen plugin12NoneBlocker: fix or replace
Example rows; the real list comes from scanning every POM.

2Find Failures Early With a Shadow CI Job

Next, we find out what actually breaks, without blocking anyone. We add an extra CI job that builds a representative set of projects with Maven 4, chosen to cover the main patterns: large multi-module builds, unusual plugins, code generation and the oldest projects. The job is non-blocking; its result does not affect the pull request, but it is collected centrally.

Java
# shadow job: same commit, Maven 4, allowed to fail
maven4-shadow:
allow_failure: true
script:
- export MAVEN_VERSION=4.0.0 # example; use the current stable release
- mvn-with-version "$MAVEN_VERSION" -B -ntp verify
- report-result --job maven4-shadow --repo "$REPO"
# weekly summary
# 120 sampled projects: 104 green, 11 failing on plugin compatibility, 5 on stricter POM validation

Notice the categories in the summary. Plugin failures are usually fixed centrally by a version change in the parent, and validation failures are small fixes in individual POMs, often real mistakes Maven 3 tolerated. Each failure is linked to the compatibility list, which tells us what to fix before anyone switches.

3Prepare the Shared Parent for Both Versions

Before any project switches, we upgrade the corporate parent and its plugin versions so they work on both Maven 3 and Maven 4. This is the key to a gradual rollout: every project can take the new parent while still running Maven 3, with nothing changing for its developers, and later switch to Maven 4 with only the wrapper version changing.

We also check prerequisites outside Maven. Maven 4 needs Java 17 or later to run, so CI images and developer setups must provide it, even for projects that still compile for older Java with release. Anything that wraps Maven, such as CI templates and IDE settings, gets checked too.

4Switch the Wrapper in Waves

Because every project uses the Maven wrapper, switching to Maven 4 is a one-line change in .mvn/wrapper/maven-wrapper.properties. We let a bot open that change as a pull request in each repository, so the project's own CI tests it, and the owning team merges it.

Text
# .mvn/wrapper/maven-wrapper.properties
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0/apache-maven-4.0.0-bin.zip
Step throughThe adoption sequence
  1. Stable Maven 4 and plugin releasestrack in the compatibility list
  2. Shadow CI job on a representative setnon-blocking, failures collected
  3. Parent and plugins work on Maven 3 and 4teams take it with no visible change
  4. Wave 1: low-risk volunteer projectsbot switches the wrapper
  5. Problems in the wave?
    YesFix centrally, pause the next waveNoStart the next wave
  6. Whole fleet on Maven 4then consider the 4.1.0 model

6 steps in order. Play them, or step through them one at a time.

We do this in waves. The first wave is low-risk projects: small libraries and services whose shadow job was green, owned by teams who volunteered. The next waves are larger groups, and the last wave holds the complex and critical builds, by which time most problems are known. If a project has trouble, reverting is the same one-line change, so the risk of each step stays small. Projects with known blockers wait until their item on the compatibility list is resolved.

5Adopt the 4.1.0 Model Last

Maven 4's new POM model, 4.1.0, brings real benefits, such as inferred versions and the subprojects element. But a build POM in the 4.1.0 model cannot be built by Maven 3 at all. If a project adopts it while some of its developers or CI jobs still run Maven 3, their builds break. And if the corporate parent used it, every project would be forced onto Maven 4 at once.

So the model change comes last, after the whole fleet, or at least each project and everything that builds it, is on Maven 4. Even then it is optional per project, and can be automated with a migration tool or recipe once it exists for our patterns. Published artifacts stay readable by everyone thanks to the consumer POM, so the model change only affects people who build the project.

6Safeguards Throughout

A few safeguards run through the whole plan. Every step is reversible: a parent version or a wrapper line. Progress is visible on a dashboard showing each project's Maven version and shadow-job status. The platform team has a support channel and a short guide with the known failures and their fixes, which grows with each wave. And we compare artifacts: for a sample of projects, the jars and published POMs built by Maven 3 and Maven 4 should match in content, which catches subtle differences that tests miss.

7Follow-up questions

How long would you expect this to take for 600 projects?

It depends mostly on the long tail of plugins. If the common plugins are ready, the parent preparation and shadow job take a few weeks, and the waves can move most active projects within a quarter or two. The last few percent, projects with abandoned plugins or no active owners, often take longest and may need a plugin replacement or a documented exception.

What if a team wants Maven 4 features early?

They can switch their own wrapper early once their shadow job is green, which helps us learn. But they should not adopt the 4.1.0 model while anyone who builds their project still uses Maven 3, and the shared parent stays compatible with both until the fleet has moved.

Why not just switch everyone at once on a set date?

Because then every failure lands on the same day, across 600 projects, and the platform team cannot help everyone at once. Waves spread the work, let us fix common problems centrally after the first wave, and keep the blast radius of any surprise small.

8Conclusion

In this answer, we planned the Maven 4 adoption for 600 projects as a sequence of safe, reversible steps: wait for a stable release and ready plugins tracked in a compatibility list, find failures with a non-blocking shadow CI job, make the shared parent work on both Maven 3 and 4, switch wrappers in waves through bot pull requests starting with low-risk projects, and adopt the 4.1.0 model only once the fleet is on Maven 4.

What to say in the interviewAbout 90 seconds aloud

Open with

I would plan it as a series of small, reversible steps. First, timing: I would wait for a stable Maven 4 release and for released versions of the plugins we use, and I would build a compatibility list from a scan of all 600 POMs, every plugin, its versions, whether a Maven 4 compatible version exists, and who uses it.

Then, if they want more

That shows the blockers early. Second, I would add a non-blocking shadow CI job that builds a representative set of projects with Maven 4 and collects the failures centrally, usually plugin compatibility or stricter POM validation.

Third, I would upgrade the corporate parent and plugin versions so they work on both Maven 3 and Maven 4, and make sure all CI images and developer setups have Java 17 to run Maven 4. Then teams can take the new parent without noticing anything.

Fourth, I would switch the Maven wrapper version per repository with automated pull requests, in waves, starting with low-risk volunteer projects whose shadow job was green, then larger groups, with critical builds last. Each switch is a one-line change that can be reverted.

Only after the fleet is on Maven 4 would I adopt the 4.1.0 model features, because Maven 3 cannot build those POMs. Throughout, I would keep a dashboard, a guide of known fixes, and compare artifacts built by both versions.

About this answer

Last updated
12 November 2026
Versions it names
Java 17
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Apache Maven guides
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "You are responsible for the build platform for 600 Maven projects. Make the plan for...": https://scrivio-interview-library.netlify.app/java/maven/b701303a2b/