Scrivio Interview library
ScenarioPrincipal7 min read · updated 12 November 2026

A Maven plugin that every one of your 300 builds depends on is abandoned upstream and fails on the next JDK release. What options do you weigh, and what policy would you set so this hurts less next time?

We have three real options: fork the plugin and maintain it ourselves, replace it with a maintained plugin that does the same job, or remove the need for it altogether. Whichever we pick, we roll it out once through the corporate parent POM so 300 builds pick it up with a single version bump. For next time, we treat build plugins like runtime dependencies: review them before adoption, prefer widely used ones, keep custom plugins few, and test our builds on JDK early-access releases so we hear about breakage months ahead.

Why this question is asked

A build plugin feels like infrastructure nobody owns. It was added years ago, it works, and nobody thinks about it until a new JDK arrives and every build in the company turns red on the same morning. Interviewers ask this scenario at senior level because the technical fix is the easy part; the hard part is choosing an option whose cost the organisation can carry for years, and setting a policy that prevents the same surprise. In this answer, we will recap why plugins break on new JDKs, weigh the three options with their real costs, see how to roll out the change to 300 builds at once, and then set a policy that gives us warning time next time.

1Why a Plugin Breaks on a New JDK

A Maven plugin is a small Java program that Maven loads and runs during the build. The compiler, Surefire, the shade plugin and code generators are all plugins. Because a plugin is ordinary Java code running inside the same JVM as Maven, it is exposed to every change the new JDK makes.

The common breakages are predictable. A plugin that reads or writes bytecode, often through an old copy of the ASM library, fails with an error such as Unsupported class file major version 69 when it meets classes compiled for Java 25. A plugin that reaches into JDK internals through reflection fails when the JDK closes that door. In every case the fix is a new release of the plugin, and an abandoned plugin will never get one.

So the real question is not how to patch the plugin this week, but who will carry this piece of code from now on.

2Option 1: Fork and Maintain It Internally

Forking means we copy the plugin's source into our own repository, fix the JDK problem, and publish it under our own groupId, for example com.acme.build:legacy-codegen-maven-plugin. This is usually the fastest way back to green, because the fix is often just a newer ASM or a small reflection change.

But there is a catch: the fork is now our product. Every JDK release, every Maven release and every security report in its dependencies lands on our desk. A plugin that took a weekend to fork can easily cost a few engineer-weeks a year once we count reviews, releases and the next three JDK upgrades. So if we fork, we budget that time explicitly with a named owner, or we write down a replacement date, for example 'fork kept alive until the end of next quarter, replacement project planned'. A fork with no owner and no end date is the same abandoned plugin with our name on it.

3Option 2: Replace It With a Maintained Plugin

Often the job the plugin does is also done by a better supported tool. An old code generator may have a successor in the same ecosystem, an old packaging plugin may be replaced by the shade or assembly plugin, and an old Docker plugin may be replaced by Jib or Spring Boot's build-image goal. Replacing costs more up front because the configuration differs and the output may differ in small ways, so we compare the generated sources or artifacts before and after on a few representative builds.

The reason this is often the best long-term choice is simple: someone else, with many more users, carries the maintenance. We pay once, during the migration, instead of every year.

4Option 3: Remove the Need for It

The cheapest plugin to maintain is the one we no longer run. Sometimes the plugin exists to work around a problem that has gone away: generating code that the framework now generates itself, checking something a modern compiler flag already checks, or producing a report nobody reads. Sometimes the work it does can move out of the build: generated client code can be published once as a versioned library instead of being regenerated in 300 builds.

We find this out by asking the teams what they actually use the plugin's output for.

Weighing the three options
OptionCost nowCost laterBest when
Fork internallyLow: small patchHigh: we own every future breakWe need green builds this week
Replace with a maintained pluginMedium: migration and output checksLow: upstream maintains itA well used successor exists
Remove the needVaries: talk to teamsNoneThe output is unused or can move elsewhere
A common answer is to fork now as a bridge and replace or remove within a set date.

5Rolling the Change Out to 300 Builds

We do not want 300 teams each editing their POM. If the plugin's version and configuration live in the corporate parent's pluginManagement, one parent release changes it everywhere. Services then pick it up with a single version bump of their parent, which an update bot such as Renovate or Dependabot can open as an automated pull request.

XML
<!-- corporate parent 42.0.0 -->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.acme.build</groupId> <!-- was org.example:old-codegen-maven-plugin -->
<artifactId>legacy-codegen-maven-plugin</artifactId>
<version>1.0.0-acme.1</version> <!-- our fork, fixed for Java 25 -->
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- each service: one line changes -->
<parent>
<groupId>com.acme</groupId>
<artifactId>acme-parent</artifactId>
<version>42.0.0</version> <!-- was 41.3.0 -->
</parent>

Notice that builds which declared the plugin's version themselves, instead of inheriting it, will not move. Before the release we search all repositories for the old coordinates, so we know which builds need a hand-made change. If many builds bypass the parent, that is a finding in itself, and it feeds into the policy.

6A Policy So It Hurts Less Next Time

The first rule is to review build plugins the way we review runtime dependencies. Before a plugin is added to the parent, someone checks who maintains it, when it last released and how widely it is used. A plugin with one maintainer and no release in three years is a risk even if it works today.

The second rule is to prefer widely used plugins, mostly the ones from the Apache Maven project and from major frameworks, and to keep the number of custom or niche plugins small. Each one we allow is a future JDK upgrade we might have to carry ourselves. A short allow-list, checked in CI, keeps that number visible.

The third rule gives us time. JDK early-access builds are published months before each release. We run a nightly CI job that builds a sample of our projects, including the parent and every shared plugin, on the next JDK early-access build. When a plugin fails there, we have most of a release cycle to fork, replace or remove it calmly, instead of a morning of red builds.

Step throughHow the early warning works
  1. Nightly job builds sample projects on JDK early accesscovers every plugin in the parent
  2. Did any plugin fail?
    YesOpen an issue for the plugin ownerNoNothing to do tonight
  3. Upstream active and fixing it?
    YesWait and pin the fixed releaseNoFork, replace or remove now
  4. Release a new parent before the JDK shipsteams upgrade in their normal cycle

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

The same three options, but chosen months early instead of on release day.

7Follow-up questions

How would you decide quickly between forking and replacing when 300 builds are already failing?

I would separate the emergency from the decision. If the builds are failing today, a fork with a minimal fix is usually the fastest way back to green, so I would do that first, publish it through the parent, and at the same time open a time-boxed task to evaluate replacements. The decision about the long-term option then gets made with a clear head, with a written end date for the fork so it does not quietly become permanent.

Can teams stay on the old JDK instead?

For a short while, yes, and that can be a valid part of the plan for frozen services. But it only defers the problem: the old JDK eventually loses security updates, and new libraries start requiring newer Java. Keeping 300 builds on an old JDK because of one build plugin means a small tool is setting the pace for the whole company, which is the situation the policy is meant to prevent.

8Conclusion

In this answer, we saw that an abandoned build plugin leaves three options: fork it and own it, replace it with a maintained plugin, or remove the need for it. Forking is fast but creates a lasting cost that must be budgeted or given an end date. Whatever we choose, the corporate parent lets one release reach all 300 builds. And a policy of reviewing plugins like dependencies, keeping custom plugins few, and testing on JDK early-access builds turns the next surprise into a planned task.

What to say in the interviewAbout 90 seconds aloud

Open with

I would first get the builds green and then make the real decision calmly. The options are to fork the plugin and maintain it ourselves, replace it with a maintained plugin that does the same job, or remove the need for it, for example because the framework now does that work or the output is not used.

Then, if they want more

Forking is usually fastest, but it means we own every future JDK and Maven break, so I would only fork with a named owner and a budget, or with a written replacement date. Replacing costs more now but moves the maintenance to a project with many users.

Removing is the best outcome when it is possible, so I would ask teams what they actually use the output for. To roll it out, I would put the plugin version and configuration in the corporate parent's pluginManagement, release a new parent, and let an update bot open the one-line parent bump in each repository.

For next time, I would review build plugins like runtime dependencies: who maintains them, how recently they released, how widely they are used. I would keep an allow-list of plugins in the parent and keep custom ones to a minimum.

And I would run a nightly job that builds a sample of projects on the next JDK early-access build, so we hear about a failing plugin months before release day.

About this answer

Last updated
12 November 2026
Versions it names
Java 25
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 "A Maven plugin that every one of your 300 builds depends on is abandoned upstream and...": https://scrivio-interview-library.netlify.app/java/maven/5c5c9853d0/