Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Over 15 years your company accumulated Ant, Maven and Gradle builds with different test setups and report formats. What would you standardise, and how do you justify the cost?

I would standardise outcomes rather than tools: one test result format (JUnit XML, plus Open Test Reporting where available), common report retention, one coverage measure and one set of required checks, whatever builds the project. To get there cheaply, we offer a template or convention plugin per build tool with pinned JUnit and plugin versions, move Ant builds only when they need significant change anyway, and justify the cost with measured build time, releases broken by test gaps and hours spent maintaining builds, funded through a build platform team with clear deprecation dates.

Why this question is asked

Fifteen years of growth leave every company with a build zoo: Ant scripts nobody dares touch, Maven POMs copied from a 2014 template, and Gradle builds each written in a different style. Each one runs tests slightly differently and reports them in its own way, so nobody can say how healthy testing is across the company. Interviewers ask this leadership question to see whether we can separate what must be the same from what can differ, plan a migration that people accept, and make a business case. In this answer, we will decide what to standardise, show how convention plugins make the standard cheap to adopt, plan the legacy migration, build the cost justification, and organise the ownership.

1Standardise Outcomes, Not Build Tools

The tempting answer is 'move everything to Gradle' or 'everything to Maven'. That is a big, risky project that does not by itself improve testing. What the company actually needs is that every project produces the same kind of evidence, wherever it was built. So the standard is about outcomes.

The first is a common test result format: JUnit XML, which Ant's junitlauncher task, Maven and Gradle can all produce, plus Open Test Reporting where the JUnit version supports it. The second is report retention: results kept centrally for, say, 90 days so trends and flaky tests can be analysed. The third is one coverage measure, for example JaCoCo line and branch coverage on the same scope, so numbers mean the same thing everywhere. The fourth is a set of required checks before merge: tests pass, no zero-test modules, coverage not dropping on changed code, and dependency checks.

With those four in place, a central dashboard can show the same numbers for an Ant build from 2011 and a Gradle build from last month.

What is standard and what may differ
AreaStandard for everyoneMay differ
Test resultsJUnit XML uploaded centrallyhow the build produces it
Retention90 days of results, 2 years of aggregateslocal artifacts
CoverageJaCoCo line and branch, same scopeextra tools a team likes
Required checkstests, zero-test guard, coverage on changesadditional checks
Build toolsupported: Maven, Gradle; Ant frozenwhich of the supported ones

2Making the Standard Cheap to Adopt

A standard that each team must implement by hand will be implemented 40 different ways. So the platform team ships it as code: a company parent POM for Maven and a convention plugin for Gradle. Each one pins the JUnit BOM version, the Surefire, Failsafe or Gradle test settings, JaCoCo, the report upload step and the zero-test guard. A team adopts the whole standard by changing its parent or applying one plugin.

Java
// Gradle: one line per project
plugins { id 'com.acme.java-service' version '4.2.0' }
<!-- Maven: one parent -->
<parent>
<groupId>com.acme.build</groupId>
<artifactId>acme-service-parent</artifactId>
<version>4.2.0</version>
</parent>
// Both pin, for example: junit-bom, surefire/failsafe 3.x, jacoco,
// failIfNoTests, report upload, shared TestExecutionListener

Notice that both carry the same version number. The platform team releases them together, so 'on build standard 4.2' means the same thing in both tools. Upgrades, for example to a new JUnit major version, then happen in one place and roll out through ordinary dependency update pull requests.

3Moving Legacy Ant Builds When They Need Change

Rewriting every Ant build at once is expensive and mostly wasted, because many old projects change twice a year. The rule I would use is: an Ant build is frozen, it must produce JUnit XML and upload it, which is usually a small change, and it is migrated to Maven or Gradle when the project needs significant work anyway, such as a Java upgrade, a new feature stream or a security fix that touches dependencies. The migration then rides on work that is already planned.

A deprecation date still matters, because 'when it needs change' can mean never. So we announce that Ant is supported until a date, for example two years out, after which the platform team stops maintaining its Ant templates. Projects still on Ant near the date get a planned slot in their team's roadmap.

Step throughDeciding what to do with a legacy build
  1. Does it produce JUnit XML and upload it?
    YesMeets the outcome standardNoSmall fix first: add the report
  2. Is significant change planned in the next quarter?
    YesMigrate to the convention plugin as part of itNoKeep it frozen
  3. Is the deprecation date close?
    YesSchedule the migration in the roadmapNoReview again next quarter

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

4Justifying the Cost With Numbers

Build standardisation competes for time with features, so it needs a business case in the language of the people who fund it. Three numbers usually make it. Build time: if the median pipeline is 35 minutes and the standard setup with caching and parallel tests brings it to 15, then 200 developers each running 6 pipelines a day save around 400 hours of waiting a day, even if only part of that waiting is lost work. Failed releases: we count releases in the last year that were rolled back or hotfixed because of a test gap, a module with zero tests, an integration suite that never ran, a missing report, and the hours each incident cost. Build maintenance: we ask teams to log time spent fixing their build for one month; 40 teams spending half a day a week each is about 20 person-weeks a month.

Against that we put the cost: a build platform team of three or four engineers, plus a migration effort that is mostly absorbed into planned work. When the numbers are measured rather than guessed, the case usually makes itself.

5Owning It: a Build Platform Team and Dates

Standards without owners decay. A small build platform team owns the parent POM, the convention plugins, the report pipeline and the dashboards, answers questions, and does the hard migrations alongside product teams. Its success is measured by adoption and by the same numbers that justified it: build times, test gaps found before release, and maintenance hours. Deprecation dates for unsupported setups, announced early and repeated in the quality review, give the migration a natural pace without a big-bang project.

6Follow-up questions

What if a team insists on its own custom Gradle setup?

They may keep it, as long as it meets the outcome standard: JUnit XML uploaded, the required checks, the agreed coverage measure. The convention plugin is the easy path, not the only path. In practice most teams move to it once they see that upgrades arrive for free.

How do you avoid the parent POM becoming a bottleneck?

By keeping it small and versioned. It contains only the standard, released often with changelogs, and teams upgrade through normal dependency update pull requests. Anything team-specific stays in the team's own build, and the platform team reviews requests to add things to the standard.

7Conclusion

In this answer, we chose to standardise the outcomes of testing, a common result format, retention, one coverage measure and required checks, instead of forcing one build tool. A parent POM and a Gradle convention plugin with pinned JUnit and plugin versions make the standard a one-line change. Ant builds are frozen and migrated when they need significant change, under a deprecation date. The cost is justified with measured build time, releases broken by test gaps and build maintenance hours, and a build platform team owns the standard.

What to say in the interviewAbout 90 seconds aloud

Open with

I would not start with 'everyone moves to one build tool'. That is expensive and does not by itself improve testing. Instead I would standardise outcomes: every build produces JUnit XML test results that are uploaded centrally and kept for an agreed time, coverage is measured the same way, say JaCoCo line and branch coverage, and there is one set of required checks, including a guard against modules that run zero tests.

Then, if they want more

Ant, Maven and Gradle can all meet that. To make it cheap, a small build platform team ships a company parent POM and a Gradle convention plugin, versioned together, that pin the JUnit BOM, Surefire and Failsafe or Gradle test settings, JaCoCo and the report upload. Adopting the standard is a one-line change, and upgrades happen in one place.

Legacy Ant builds are frozen: they only need to produce and upload JUnit XML, and they are migrated when the project needs significant change anyway, with a deprecation date so that does not mean never.

To justify the cost, I would measure: pipeline time and how much waiting it causes, releases in the last year that were rolled back because of test gaps, and hours teams spend maintaining builds. Against that sits a team of three or four engineers.

With real numbers the case is usually clear, and I would report progress in the quality review.

About this answer

Last updated
12 November 2026
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
JUnit user guide
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 "Over 15 years your company accumulated Ant, Maven and Gradle builds with different test...": https://scrivio-interview-library.netlify.app/java/junit/e883304570/