DEV Community

Fulton Browne
Fulton Browne

Posted on

Whats you preferred jvm build system?

is is it gradle, maven, or something else?

Top comments (24)

Collapse
 
gogugovici profile image
Mihai Gogugovici

To truly understand gradle, you need to know groovy. I don't see the benefit of investing time in learning another programming language to help me...build Java projects. It's simply not worth it, in my book, unless it is central to your job. On the other hand, everybody knows xml, so maven is a better choice. Obviously, it's just my opinion.

Collapse
 
fultonbrowne profile image
Fulton Browne

You should check out gradle over kotlin, it's great for me, being a huge fan of kotlin.

Collapse
 
siy profile image
Sergiy Yevtushenko

Must admit that Kotlin and Gradle are great match. They both solve most irrelevant issues in things they are pretending to improve.

Thread Thread
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

That's a lot of negations, I'm not sure what you really mean here!

Thread Thread
 
siy profile image
Sergiy Yevtushenko

Kotlin "improves" Java by eliminating semicolons. Gradle "improves" Maven by eliminating XML. Semicolons in Java and XML in Maven are least relevant issues (if issues at all).

P.S. Yes, I know that there are other improvements, I'm just kidding.

Thread Thread
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

I see your point, there are trade-off for everything and people love to forget about it.
Maven for example is simpler than Gradle, and that made the IDE integration much better for years

Thread Thread
 
siy profile image
Sergiy Yevtushenko

C++ has very good principle - "don't pay for what you don't use". Most Kotlin and Gradle "extra" features over Java and Maven respectively have no (or very small) value for most developers, but there is no way to avoid "paying" for them.

Thread Thread
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Well, it's a very good principle for people for who C++ is a good solution.
For others like me, focusing on low level stuff like this is not worth the time invested.

Thread Thread
 
siy profile image
Sergiy Yevtushenko

This principle is not specific for low level stuff. It just prevents cheap excuses like "it's slow and bloated, but it's the price for rich functionality”.

Collapse
 
josephtaylor profile image
J. Taylor O'Connor

Maven! Some say it’s too opinionated and rigid, but that’s what I like about it. No surprises.

Collapse
 
siy profile image
Sergiy Yevtushenko

Maven's build lifecycles is a brilliant idea. It looks rigid, because it limits number of ways things can be done. In fact it just organizes build process, makes it predictable and reproducible.

Collapse
 
josephtaylor profile image
J. Taylor O'Connor

Totally agree! If the build tool is too flexible you get creativity working its way into the build process, which just makes it harder to understand. Generally, I feel like if you’re trying to do something in your build that can’t fit into maven’s paradigms, it’s probably doing something it shouldn’t be doing.

Collapse
 
mstrangfeld profile image
Marvin Strangfeld

I prefer Gradle for medium to large sized projects. It is really fast, the plugin ecosystem is great and the Kotlin DSL is just awesome! Although I admit that the first steps can be hard, especially because of the lack of good documentation...

Collapse
 
mehdishahdoost profile image
Mehdi Shahdoost

I agree with you. First step of Gradle is very hard, especially, If you are a maven guy.

Collapse
 
fultonbrowne profile image
Fulton Browne

I can agree with that, it's a pain to set up.

Collapse
 
not_jffrydsr profile image
@nobody

Does leiningen count? Clojure is hosted on the JVM and compiles to JavaByteCode so I'd say so 😖
It's a terrific if not limited and faulty build system for both Clojure (not so much ClojureScript) and Java class files.

Otherwise, I've only used Maven once for a Dr. Java packaged-project and as a Lisper (? : one who codes in Lisps) I can't stand XML clunk and junk so idk, willing to try something less fugly.

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

If Maven is good for you and ain't broken, don't fix it, stay with Maven.

Personally I use Gradle for everything because I do Kotlin, Spring and Android programming.

I have seen comments about Gradle and Kotlin, and that it's unfortunately hard to make the first step.

Well that depends if you are doing Android or not.

The Android Framework team has unfortunately made nothing to make using Gradle and Kotlin easily.

With Spring on the backend, it's super simple to get started:

Open start.spring.io/

I love the feature Explore - Ctrl + Space and use it all the time

Collapse
 
siy profile image
Sergiy Yevtushenko

Test reports are generated by appropriate plugin, not by a build system itself. And yes, you can generate HTML test report with maven using following command:

# mvn surefire-report:report

Not looked into every detail how gradle does this, but I guess it uses the same maven plugin to generate this report.

Collapse
 
moaxcp profile image
John Mercier

I've used ant, gradle, and maven. I prefer gradle but like ant it is really easy to make a confusing mess out of the build.

 
siy profile image
Sergiy Yevtushenko
Collapse
 
baso53 profile image
Sebastijan Grabar

IMO, both Maven and Gradle are overcomplicated. But, if I have to chose, then Gradle.

Collapse
 
siy profile image
Sergiy Yevtushenko

Maven is just a standard. Gradle is an attempt to reduce verbosity of tiny part of the project.