Java Full-Stack Index Q3/2022: Build Tools
The content of this page is identical throughout Q3/2022 - July, August, and September.
Summary for Q3/2022
- Popularity trend: Maven is 2.5-3.5 times as popular as Gradle, except for Stack Overflow, where both are neck-to-neck. Ant and sbt have both 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 | Aug |
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. Flutter is the baseline.
Maven wins, Gradle is second, Ant is third, and sbt is last. Maven is mentioned more than 2.5 times as often as Gradle. At 61% of Gradle’s mentions, good ol’ Ant is putting up a strong performance. sbt is hardly mentioned.
Please see here for details, caveats, and adjustments of the job ad mentions.
You can find the detailed search results with links here. They include breakdowns by continents:
Developers
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 are growing at 73% and 58% of their March 2017 peak. Ant and sbt have a negligible search volume.
Courses Bought at Udemy
Udemy is one of the biggest online learning sites. They publish the number of courses and students beyond a certain threshold (possibly around 100,000 students). This shows how many people evaluate a technology.
Unfortunately, Udemy shows the number of students only for Maven (135k). 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:
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.
Maven wins, Gradle is second, sbt third, and Ant last. Maven and Gradle are neck-to-neck. Gradle is closer to its peak from the end of 2021, while Maven is off a third from its mid-2015 high. This is the only category where sbt is in third place because Ant has been in decline for 13 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.