DEV Community

Erik Nelson
Erik Nelson

Posted on

JVM devs who prefer Maven over Gradle, what are your reasons?

I've personally always found Gradle more intuitive to use and of late they've been shipping a lot of tangible improvements. However, I still see a lot of people who prefer Maven and I'm curious as to what the reasons are that drive that preference.

Discussion (8)

alexanderbelldev profile image
Alexander Bell

I'm always perplexed when I see the vast amounts of people who use Maven over Gradle. This is especially prominent in the Spring world, I've tried out both and have chosen Gradle 100% of the time, Groovy seems so much easier to work with than XML.

siy profile image
Sergiy Yevtushenko

It might be not obvious at the first sight, but whole Java ecosystem is mostly built on top of maven dependency management. In other words, maven is the native tool for this purpose. And while POM syntax is clunky and verbose, maven is the tool which introduces important innovations/features (like BOM's or support for recent Java versions), rather than one that catches up. Maven is better supported by IDE (and importing it into Idea does not take ages). From my personal experience I can add, that I never had issues with artefact reproducibility with maven, only with gradle.

After all, gradle is just plugs in into maven ecosystem, not vice versa, so why bother with yet another intermediate layer?

cauchypeano profile image
Igor Konoplyanko

I would personally prefer Gradle over Maven for following reasons:

  • Performance - gradle supports parallel builds this making possible to get fast build times. Maven sucks at this (maybe till version 2, don't know current state)
  • Readability: yes, it's more readable than tons of xml's
  • Reusability: it's much easier to write plugins and extract parts of your build in separate files.
skapral profile image
Kapralov Sergey

Personally, I like the idea of gradle, but don't like groovy. For me, groovy is counterreadable. If only there was a way to do the same with plain Java...

dmfay profile image
Dian Fay

Maven was the only game in town when I got started with Java, and I just plain don't like Groovy.

erikthered profile image
Erik Nelson Author

The Kotlin DSL is stable and usable now, so that's worth a look to avoid Groovy.

chains5000 profile image
Pablo Fradua

Maven's more than enough for most projects and, given it's older than Gradle, I guess people think "why change?"

rohansawant profile image
Rohan Sawant

When I started out everything kept telling me to use Maven so I did, then I worked a bit on Android and I found myself checking out Gradle.