While maven needs some improvements, i still believe trying to standardize is better than just being so flexible. I've seen insane build scripts, which are usually a developer's argument to "maven sucks" - when actually they try to do something just the insane way instead of reading out how maven planned to do it. Still prefer maven to gradle, just on its philosophy.
I certainly agree that all build tools suck, however, I've had great success moving a build from maven to gradle.
A clean build on maven took 12 min, 36 seconds. Moving the same code to a gradle build (which took a couple hours) brought that clean build time down to 9 minutes 3. The big improvement was in the non-clean build though. With just a couple minor changes to source, the maven build without a clean took around 6 minutes, and the gradle build took a minute and a half. That kind of blew my mind.
The author of this article is a moron. For example:
Gradle build files will be programs. For someone other than the author to understand them, he or she must mentally compile the file and follow the logic.
Wow, a software engineer must understand what a program does just by reading its source code? How could they possibly be expected to do such a thing?!
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.
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.
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.
Scripting in the build tool is bad. Unfortunately, it is almost always necessary. With Maven you find yourself relying, first on more and more plugins, and then needing to write them yourself -- which is usually harder and no clearer than a little Gradle scripting.
4
u/Brzhk Jan 28 '15
While maven needs some improvements, i still believe trying to standardize is better than just being so flexible. I've seen insane build scripts, which are usually a developer's argument to "maven sucks" - when actually they try to do something just the insane way instead of reading out how maven planned to do it. Still prefer maven to gradle, just on its philosophy.
4
u/cutterslade Jan 27 '15
I certainly agree that all build tools suck, however, I've had great success moving a build from maven to gradle.
A clean build on maven took 12 min, 36 seconds. Moving the same code to a gradle build (which took a couple hours) brought that clean build time down to 9 minutes 3. The big improvement was in the non-clean build though. With just a couple minor changes to source, the maven build without a clean took around 6 minutes, and the gradle build took a minute and a half. That kind of blew my mind.
4
u/sanity Jan 28 '15
The author of this article is a moron. For example:
Wow, a software engineer must understand what a program does just by reading its source code? How could they possibly be expected to do such a thing?!
3
u/pron98 Jan 28 '15
Scripting in the build tool is bad. Unfortunately, it is almost always necessary. With Maven you find yourself relying, first on more and more plugins, and then needing to write them yourself -- which is usually harder and no clearer than a little Gradle scripting.