Java Full-Stack Index Q4/2022: Build Tools
The content of this page is identical throughout Q4/2022 - October, November, and December.
Summary for Q4/2022
- Popularity trend: Maven is 2.5 times as popular as Gradle, except for Stack Overflow, where Gradle is slightly ahead of Maven. Ant and sbt have declined for years.
- 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
2022 | Sep | Aug | Jul |
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. Now 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 representing 89% of the worldwide GDP in 2020. It demonstrates the willingness of organizations to pay for a technology - the strongest indicator of popularity in my mind. Gradle is the baseline.
Maven wins, Gradle is second, Ant is third, and sbt is last. Maven leads Gradle 2.7:1, slightly growing. Ant shrinks slowly while sbt is stable with meager numbers.
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 (141k). 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.
This link produces the chart above.
Maven wins, Gradle is second, Ant is third, and sbt is last. Maven and Gradle have declined this year after Google changed its counting. Ant has declined by 98%, while sbt has always had a comparatively low search volume.
Questions at Stack Overflow
Stack Overflow Trends shows which percentage of questions at Stack Overflow has a particular technology tag. It is a proxy for using a technology during evaluation and productive use. “More questions = better” to me.
This link produces the chart above.
Gradle wins, Maven is second, sbt is third, and Ant is last. Maven and Gradle are neck-to-neck, but this time Gradle is ahead. Gradle is just 8% off its peak from the end of 2021, while Maven is off by 42% from its mid-2015 high. This is the only category where sbt is in third place because Ant has been in decline for 13.5 years.
Analysis
- Maven dominates Java build tools with 2-4 times the values of Gradle, except for Stack Overflow. It’s the default build system in the Java world. And 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 complicated: You write a Java class and distribute the task alongside your build file.
- Gradle is the runner-up in Java build tools. It has much smaller build files than Maven, 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 61% 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 heavily customize your build, then use Gradle.
- Otherwise, use Maven.