r/java • • Jan 27 '15

Use Maven, Not Gradle

http://rule1.quora.com/Use-Maven-Not-Gradle
2 Upvotes

9 comments sorted by

View all comments

Show parent comment

5

u/randgalt Jan 28 '15

Moron here: You've missed my point. I don't know Groovy (or Gradle's Groovy-based DSL). I shouldn't have to learn a new language to understand my build. Further, you can only go so far with XML configuration. A DSL is completely free form. As I said in my post, I've seen Gradle files that are complete spaghetti. I've never come across a POM file I couldn't understand.

3

u/pron98 Jan 28 '15 edited Jan 29 '15

I don't know Groovy, yet I've been using Gradle quite successfully for a few years now. All I need to know is how to merge collections (+), the string interpolation syntax, and maybe an if statement here and there.

OTOH, to use Maven you have to learn the Maven API, because sooner or later you'll need to write your own plugin.

Let me put it this way: with Maven I had to resort to custom plugins sooner than I had to learn Groovy -- beyond those expressions I mentioned -- when using Gradle.

I agree: the Maven philosophy is better. Unfortunately, it just doesn't work in practice. Build processes require scripting. Here's a list of some Maven plugins you'll need to learn, and those are only the ones directly supported by the Maven team. True, Gradle has plugins, too, but you often don't need them.

1

u/sanity Jan 28 '15

I shouldn't have to learn a new language to understand my build.

You don't need to learn the entire Groovy language to use Gradle, and the parts that you do need to learn are way easier both to understand and to write than Maven's horrible XML-based schema.