Author: Karsten Silz
Sep 17, 2023 7 min read

Permalink: https://betterprojectsfaster.com/guide/java-tech-popularity-index-2023-q3/build/

Java Tech Popularity Index Q3/2023: Build Tools


This is an old version! Click below for the current one.

See Current Version


Summary for Q3/2023

Here is the scorecard of Maven (left) and Ant (right) vs. Gradle (100%), not on the card. The arrows show the trend vs. Gradle.

Maven (left) and Ant (right) vs. Gradle (100%)
Maven (left) and Ant (right) vs. Gradle (100%)

Maven holds steady against Gradle except for Stack Overflow. Ant has disappeared from searches and Stack Overflow and trends downwards in jobs.

Here are my recommendations:

  • If you use Scala, then use sbt.
  • Otherwise, if you absolutely cannot stand XML files and/or need to customize your build heavily, then use Gradle.
  • Otherwise, use Maven.

Archive

2023 Q2 Q1
2022 Q4 Q3

Table Of Contents

Choices

Here are the choices in alphabetical order:

Popularity

Why Popularity - and How?

Picking a popular technology makes our developer life easier: Easier to learn, easier to build, debug & deploy, easier to find jobs/hire, and easier to convince teammates & bosses. Popularity can make a difference in two situations: When multiple technologies score similarly, we could go for the most popular one. And when a technology is very unpopular, we may not use it.

I measure popularity among employers and developers as the trend between competing technologies. I count mentions in job ads at Indeed for employer popularity. For developer popularity, I use Google searches, Udemy course buyers, and Stack Overflow questions.

Employers: Job Ads

The Indeed job search is active in 62 countries. I picked 59 countries representing 69% of the worldwide GDP in 2022, excluding three countries because English word searches proved ineffective there: China, Japan, and South Korea. Job searches demonstrate the willingness of organizations to pay for a technology - the strongest indicator of popularity in my mind. Gradle is the baseline.

Job ad mentions at Indeed for Ant, Gradle, Maven, and sbt
Job ad mentions at Indeed for Ant, Gradle, Maven, and sbt

There are now job numbers for May 2023 because of changes on the Indeed websites.


Maven wins, Gradle is second, Ant third, and sbt last. The number of developer ads is down in 2023: Maven ads nearly halved, Gradle ads did halve. Maven leads Gradle 2.8:1, being back to where it stood last December. Ant continues its slide while sbt is down again after a brief rise in February and March.

Please see here for details, caveats, and adjustments to the job ad mentions.

You can find the detailed search results with links here. They include breakdowns by continents:

Developers

Students at Udemy

Udemy is one of the biggest online learning sites. They publish the number of people who bought a course (beyond a certain threshold, possibly around 100k). This shows how many people evaluate a technology.

Unfortunately, Udemy shows the number of students only for Maven (149k). That’s why there’s no chart here, as a comparison is impossible.

Here are the links that show the courses for all and the number of students for some:

Google Searches

Google Trends demonstrates the initial interest in a technology over time. “More searches = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle. This is the chart link.

Google Trends for Ant, Gradle, Maven, and sbt
Google Trends for Ant, Gradle, Maven, and sbt

Google changed its measurement algorithms on January 1, 2016, and January 1, 2022. That caused spikes for all values, especially in 2022.


Maven wins, Gradle is second, Ant third, and sbt last. Maven leads Gradle 2.3:1. Maven and Gradle have moved in lockstep in the previous two years. Ant has declined by 99% in the last 19 years and is on its way out. sbt has always had a very low search volume and has had losses for six years.

Monthly Questions at Stack Overflow

We can run database queries against the questions, answers, and comments at Stack Overflow with the StackExchange Data Explorer. The number of monthly questions is a proxy for using a technology during evaluation and productive use. “More questions = better” to me. The percentage behind the current value is the drop-off from the peak value, marked with a circle.

Monthly Questions at Stack Overflow for Ant, Gradle, Maven, and sbt
Monthly Questions at Stack Overflow for Ant, Gradle, Maven, and sbt

Maven wins, Gradle is second, sbt is third, and Ant is last. Maven and Gradle have been neck-to-neck for the previous two years. Gradle was ahead in the last quarter, but Maven claimed the #1 spot again in a photo finish. Ant and sbt peaked nine years ago and slide towards zero.

Please note that the overall monthly number of Stack Overflow questions is down 42% since ChatGPT appeared (November 2022 vs. August 2023):

Monthly Questions at Stack Overflow
Monthly Questions at Stack Overflow

I used two queries to get the number of monthly questions below because putting all in one query timed out. You can run them in the StackExchange Data Explorer.

(Click to expand) Query 1: Ant and Gradle
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-06-30';

WITH Tagged AS (
  SELECT
    Id,
    CreationDate,
    CASE WHEN CHARINDEX('<gradle>', Tags) > 0 THEN 1 ELSE 0 END AS GradleTag,
    CASE WHEN CHARINDEX('<ant>', Tags) > 0 THEN 1 ELSE 0 END AS AntTag
  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for 
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(GradleTag) AS Gradle,
    SUM(AntTag) AS Ant
  FROM Tagged
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Gradle,
  Ant
FROM MonthlyCounts
ORDER BY Month;
(Click to expand) Query 2: Maven and sbt
DECLARE @StartDate DATE = '2009-01-01';
DECLARE @EndDate DATE = '2023-06-30';

WITH Tagged AS (
  SELECT
    Id,
    CreationDate,
    CASE WHEN CHARINDEX('<maven>', Tags) > 0 THEN 1 ELSE 0 END AS MavenTag,
    CASE WHEN CHARINDEX('<sbt>', Tags) > 0 THEN 1 ELSE 0 END AS sbtTag
  FROM Posts
  WHERE
    PostTypeId = 1 AND -- 1 for 
    CreationDate >= @StartDate AND
    CreationDate <= @EndDate
),
MonthlyCounts AS (
  SELECT
    DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS Month,
    SUM(MavenTag) AS Maven,
    SUM(sbtTag) AS sbt
  FROM Tagged
  GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
)
SELECT
  Month,
  Maven,
  sbt
FROM MonthlyCounts
ORDER BY Month;

Analysis

  • Maven dominates Java build tools with 2.5 times the values of Gradle, except for Stack Overflow. It’s the default build system in the Java world. Unlike Gradle, few things break from release to release. Developers like that stability! Its verbose XML files are a minus for some. And creating custom build tasks is more complicated than in Gradle: You write a Java class and distribute the task alongside your build file.
  • Gradle is the runner-up in Java build tools. It’s faster than Maven and has much smaller build files, which can be either in Groovy or Kotlin. Creating custom build tasks is easy: We just add a method in the build file. Unfortunately, more things break from release to release than in Maven. That can be annoying!
  • Ant is the granddaddy of Java build tools: Its first release was in July 2000. Unlike other granddaddies, it’s still active: Its job ad mentions are 55% of Gradle’s. There are probably a ton of legacy projects using Ant. But we shouldn’t use it on new projects – Maven and Gradle are much better options.
  • sbt is the odd man out here: It’s mainly used for Scala projects. The build files are also written in Scala.

So here’s my recommendation:

  • If you use Scala, then use sbt.
  • Otherwise, if you absolutely cannot stand XML files and/or need to customize your build heavily, then use Gradle.
  • Otherwise, use Maven.

Next Issue

The next issue will arrive in November 2023. Subscribe to it as a newsletter to have it in your inbox then!


comments powered by Disqus