Quick revision
The short answer
We start by measuring the drift with a script that inventories parents, plugin versions and Java levels across all repositories. We define one target, a thin corporate parent for build plugins plus a platform BOM for versions, layered on Spring Boot, and migrate opportunistically: during upgrades teams already do and through automated pull requests, for example with OpenRewrite recipes. It is worth the cost only if drift shows up in measured pain such as slow security upgrades, broken builds or long onboarding, and we leave frozen, rarely changed services alone unless they carry security risk.
What to remember
In this answer, we saw how to converge on one build convention without a big bang: inventory the drift with a script, define a layered target of a thin corporate parent and a platform BOM on top of Spring Boot, and migrate during upgrades teams already do and with automated pull requests from OpenRewrite recipes. We judged the effort by measured costs such as slow security upgrades and broken builds, and left frozen services alone unless they were a security risk.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
We start by measuring the drift with a script that inventories parents, plugin versions and Java levels across all repositories. We define one target, a thin corporate parent for build plugins plus a platform BOM for versions, layered on Spring Boot, and migrate opportunistically: during upgrades teams already do and through automated pull requests, for example with OpenRewrite recipes. It is worth the cost only if drift shows up in measured pain such as slow security upgrades, broken builds or long onboarding, and we leave frozen, rarely changed services alone unless they carry security risk.
Background to this question
Large companies accumulate build conventions the way old cities accumulate street layouts. Each one made sense when it was created, and together they make every company-wide change slow. Leaders get asked this because the temptation is either to do nothing or to launch a huge migration that stalls halfway. A strong answer shows how to make the problem visible, define a target, move gradually and decide honestly whether it is worth doing at all. In this answer, we will see how to inventory the current state, define the target convention, migrate without a big bang, and judge the cost against the benefit.
1Why Drift Becomes Expensive
Every Maven build gets its plugin versions, Java level and dependency versions from somewhere: a corporate parent from 2012, spring-boot-starter-parent, or nothing at all, where each POM sets its own. When a company has all three, a simple company-wide change turns into many different changes. Upgrading Jackson after a security advisory means one change for services on the Spring Boot parent, a different one for services on the old corporate parent, and hand edits in services with no parent at all.
That is the real cost of drift: not ugliness, but the time it adds to every change that should reach the whole fleet. So before deciding anything, we need numbers.
2Inventory the Drift With a Script
We write a small script that clones or queries every repository, reads each pom.xml, and records the parent, the Java level, the versions of the important plugins and of Spring Boot. Running mvn help:effective-pom gives the real values after inheritance, but even a plain XML read of each POM is enough for a first picture.
Notice that we also record the date of the last commit. It lets us separate active services from frozen ones, which matters a lot for the plan. The result of this step is usually surprising in both directions: some parts are better than people feared, and a few corners are much worse.
3Define One Target Convention
The target should be small and layered, so it does not create a new monolith to fight with in ten years. A thin corporate parent holds build conventions: plugin versions and configuration for compiler, Surefire, Failsafe, Enforcer, and the release setup. A platform BOM holds dependency versions: it imports spring-boot-dependencies and adds the company's own libraries and approved third-party versions. Spring Boot stays the base for versions, because its BOM is tested and maintained for us.
Services then use the corporate parent, which itself inherits from spring-boot-starter-parent, or they import the platform BOM if they cannot use the parent. Either way, one release of the parent or the BOM reaches every service that has migrated.
- Service POMonly what is specific to the service
- Thin corporate parentplugin versions and build conventions
- Platform BOMcompany libraries and approved versions
- spring-boot-dependenciestested versions for the Spring ecosystem
4 layers, from the top down. Step through them one at a time.
Each layer has one job, so it can change on its own schedule.
4Migrate Without a Big Bang
We do not ask 540 teams to stop and migrate. Instead we attach the migration to work they are already doing. When a service upgrades Spring Boot, moves to a new Java version, or gets a security fix, the change also moves it to the target parent. Most active services touch their build several times a year, so within a year most of them have moved.
For the rest, we automate. OpenRewrite, a tool that rewrites source and build files with tested recipes, can change a parent, upgrade plugin versions and replace deprecated configuration across many repositories. We run a recipe, check that the build still passes, and open an automated pull request for the owning team to review and merge. Starting with a few volunteer teams lets us fix the recipe before rolling it out widely.
5Judge Whether It Is Worth the Cost
Convergence is not free. Each migration needs a review and a test cycle, and some will break. So we justify it with measurements taken before we start. Useful ones are the time from a security advisory to the fix being deployed across the fleet, the number of builds broken by environment or plugin issues per month, and how long a new engineer takes to make their first change in an unfamiliar service.
If the inventory shows that a critical library upgrade took three weeks because of 90 hand-maintained POMs, the case is strong. If drift exists but nobody can point to a cost, the honest answer may be to set the target for new services and stop there.
Frozen services, ones nobody has changed for years and that are rarely deployed, should be left alone unless they carry security risk. Migrating them costs effort and creates risk for no benefit. If they have known vulnerabilities, they get a minimal fix or a retirement plan, not a convention migration.
- Changed in the last 12 months?YesMigrate during its next upgrade or by automated pull requestNoTreat as frozen
- Frozen: known security risk?YesMinimal fix or retirement planNoLeave it alone
- Track progressshare of active services on the target parent
3 steps in order. Play them, or step through them one at a time.
6Making It Last
Once the target exists, new services must start on it, which means the service template and the internal Initializr use it from day one. The inventory script becomes a dashboard that runs weekly, so drift is visible and does not quietly return. And the parent and BOM get a regular release cadence with release notes, so teams trust that upgrading is routine rather than risky.
7Follow-up questions
How do you handle teams that refuse the migration?
First I find out why. Often the reason is real, such as a plugin the target parent does not support, and the target should change. If there is no real reason, I rely on making the migration cheap with automated pull requests and on tying it to something the team needs, such as a Spring Boot upgrade. I would not force frozen services to move.
Why not make every service use spring-boot-starter-parent directly?
That works for versions and basic plugins, but the company still needs its own conventions, such as release configuration, Enforcer rules and internal repositories. Putting those in a thin corporate parent that inherits from the Spring Boot parent keeps one place for company rules without copying them into every service.
What makes an OpenRewrite migration safe at scale?
Running the recipe on a pilot group first, building each changed repository in CI before opening the pull request, and letting the owning team review and merge it. The recipes are code, so we version and test them like code, and we keep the change in each pull request small so a reviewer can understand it.
8Conclusion
In this answer, we saw how to converge on one build convention without a big bang: inventory the drift with a script, define a layered target of a thin corporate parent and a platform BOM on top of Spring Boot, and migrate during upgrades teams already do and with automated pull requests from OpenRewrite recipes. We judged the effort by measured costs such as slow security upgrades and broken builds, and left frozen services alone unless they were a security risk.
Open with
I would start by making the drift visible. A small script across all repositories records each build's parent, parent version, Java level, key plugin versions and last commit date, so we know how many services are on the 2012 parent, on the Spring Boot parent, or on nothing.
Then, if they want more
Then I would define one target, kept deliberately thin: a corporate parent for plugin versions and build conventions that inherits from spring-boot-starter-parent, and a platform BOM for versions that imports Spring Boot's BOM and adds our own libraries. I would not run a big-bang migration.
Services move when they already touch their build, for a Spring Boot or Java upgrade, and for the rest we use OpenRewrite recipes to open automated pull requests, starting with a pilot group. Whether it is worth it depends on measured cost.
I would measure how long security upgrades take across the fleet, how often builds break for build reasons, and onboarding time. If those costs are real, convergence pays off; if nobody can name a cost, I would just make new services start on the target.
Services that have not changed in years I would leave alone, unless they carry a security risk, in which case they get a minimal fix or a retirement plan. And I would keep the inventory running as a dashboard so drift stays visible.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Java 8
- 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 "Your company has 15 years of Maven builds: some services on a corporate parent from...": https://scrivio-interview-library.netlify.app/java/maven/f13cf59dfd/