News for hackers. Stuff that matters.
Re:Maven is broken by design by auvrw on Saturday October 05, 2013 @04:30AM (#6499990)
> If you work in Java and you are still stuck with Maven, please, take a look at Gradle.

or ivy? i really haven't spent a lot of time toying with the various build systems. i tend to use ant until manual dependency management becomes ... unmanageable, then maven because i've apparently been brainwashed (i.e. i heard that they use maven at a lot of not-so-bad companies like thoughtworks).

after the article, i do like the suggestion of ivy+buck, neither of which i'd paid attention to before below the clamor of gradle trampling upon maven. before starting considerations along the lines "this software does not do X" or "it does X wrong," what about asking "what's a reasonable task for a single tool?" or more specifically,

"do we really want dependency management and builds handled by the same program?" my impulse is always to go for things that are as modular as possible, but perhaps the reflex response of "no" isn't correct for some reason obscured by lack of experience with the particular problem domain.

Re:Maven is broken by design by koevet on Saturday October 05, 2013 @05:46AM (#6500139)
Ivy is "only" a dependency manager, you can't build stuff with it. Gradle was originally based on Ivy but they decided to roll their own Ivy/Maven compatible dependency engine.

Gradle is a very powerful engine: we use it not only to build Java/Scala/Groovy code but also to drive our continuous integration/deployment cycle.

Again, it obviously depends on your requirements, but if you have to deal with large and complex projects, with lots of submodules to build, do consider Gradle.

Re:Maven is broken by design by stephen on Saturday October 05, 2013 @12:19PM (#6501101)
> but they decided to roll their own Ivy/Maven compatible dependency engine.

I'd heard about that...as a non-Gradle Ivy user, when they started this, I asked two of their devs if they were going to basically write an "Ivy v2", submit their improvements/patches back to Ivy, etc.

Their response was, paraphrased, "absolutely not, we're building our own thing that is way more awesome and are not interesting in sharing". Which I found disappointing.

I know a clean break is easier, and that the Ivy codebase likely needs it, but Ivy could really have used their focus, and I think it would have benefited the wider Java ecosystem (as many non-Maven builds use Ivy to talk to Maven repos) instead of just Gradle itself.

Re:Maven is broken by design by smrtinsert on Saturday October 05, 2013 @10:41AM (#6500780)
havent had a problem ivy and ant didn't tackle relatively gracefully yet. I'm only using gradle because all the cool kids are but tbh I'm not really a fan of groovy. I wouldn't ever use the language outside of gradle and thats a bad sign to me.
Re:Maven is broken by design by gaius on Saturday October 05, 2013 @05:55AM (#6500160)
I looked at all these tools... Then carried on using Makefiles. Seriously, people, building has been a solved problem for decades. Let's all stop fooling around and concentrate on actually writing code!
Re:Maven is broken by design by koevet on Saturday October 05, 2013 @06:00AM (#6500171)
Well, I use VIM to write Java/Scala/Groovy/Python code but unfortunately large, complex projects do exists and the java ecosystem is particularly good at making things more complex that they need to be.

A reliable, flexible and built on sane principles build system is required when dealing with large enterprisey projects.

Re:Maven is broken by design by IanCal on Saturday October 05, 2013 @07:15AM (#6500324)
> Then carried on using Makefiles

How do you deal with versioned dependencies with Makefiles?

Re:Maven is broken by design by gaius on Saturday October 05, 2013 @07:57AM (#6500414)
Obviously the Makefiles gets branched with the err, branch. And merged with the merge.
Re:Maven is broken by design by IanCal on Saturday October 05, 2013 @08:02AM (#6500425)
I don't mean how do you version a Makefile, but if your project depends on 6 libraries (with various version requirements) each with their own sets of dependencies, how do you use Makefiles to download & install all of them?
Re:Maven is broken by design by qznc on Saturday October 05, 2013 @09:35AM (#6500625)
It depends. For tracking released versions, just let the Makefile download (wget,tar) and build (./configure,$(MAKE)) it. For tracking repo revisions use the VCS (git-submodule,git-subtree).
Re:Maven is broken by design by gaius on Saturday October 05, 2013 @08:13AM (#6500446)
Ah, I see. Well I don't get involved in projects as Rube Goldberg as that. The 3rd party libraries I rely on have stable interfaces, and current-version is always preferable.
Re:Maven is broken by design by IanCal on Saturday October 05, 2013 @08:21AM (#6500464)
Oh right, then yeah Makefiles are the way to go :)

I'm not sure I'd call those things Rube Goldberg, it's just about depending on small libraries and having a reproducible build if it gets checked out on a CI machine and run.

As always, all about choosing the right tool for the job. If you can solve it cleanly with something simpler then you probably should. Something like Maven should only be used if you're really sure you actually need it, because otherwise it'll be a pain in the arse.

Having said that, splitting up "building" and "dependency management" can make things much simpler. Pip (python dependency manager) is incredibly simple, with the same kind of interface as apt, and if you've got a file with a list of dependencies you just tell it to install all of those. Then you can use whatever you want for the build process itself.

Re:Maven is broken by design by qwerta on Saturday October 05, 2013 @08:42AM (#6500507)
Ant is essentially the same as makefiles.
Re:Maven is broken by design by davidgerard on Saturday October 05, 2013 @07:59PM (#6502537)
The "this is code but you have to write it as correctly-formed XML" bit is whacky. OTOH, as syntax goes, it probably beats syntactically-significant varieties of whitespace.
Re:Maven is broken by design by auvrw on Sunday October 06, 2013 @12:18AM (#6503098)
> The "this is code but you have to write it as correctly-formed XML" bit is whacky.

that's all over the java ecosystem, though, not just build tools: android and (i think?) spring both use several types of xml files to build. not saying it's not whacky, but it's def. prevalent.

Re:Maven is broken by design by h_r on Saturday October 05, 2013 @09:41AM (#6500637)
Or... it's more like makefiles with a lot of shell scripting sprinkled throughout.
Re:Maven is broken by design by alextingle on Saturday October 05, 2013 @05:11PM (#6502096)
So... exactly like Makefiles, then.
Re:Maven is broken by design by clumsysmurf on Saturday October 05, 2013 @06:39AM (#6500242)
Actually, according to the May 2013 Thoughtworks Tech Radar at

http://www.thoughtworks.com/radar

In the Tools category, Gradle is "Adobt", while Maven is on "Hold". You can read the full report but I'll exert the relevant section:

"Language-based build tools like Gradle and Rake continue to offer finer-grained abstractions and more flexibility long term than XML and plug-in based tools like Ant and Maven. This allows them to grow gracefully as projects become more complex."

They had a more elaborate explanation in previous editions.

Re:Maven is broken by design by pjmlp on Saturday October 05, 2013 @09:43AM (#6500643)
In many enterprises we work for, Maven is still in the "to adopt" phase.

Having said this, I am also an Ant guy for simple projects. Too many scars from an Ant -> Maven migration. All pom.xml files ended up more complex than the original build.xml files, as Maven did not have proper support for the way the build was working before.

Re:Maven is broken by design by beamso on Saturday October 05, 2013 @08:41PM (#6502621)
And the last in the list of references in the last page of the PDF is :

Why Everyone (Eventually) Hates (or Leaves) Maven : http://nealford.com/memeagora/2013/01/22/why_everyone_eventu...

Re:Maven is broken by design by ajanuary on Saturday October 05, 2013 @04:48AM (#6500030)
Ironically the biggest pain with Ivy is that 99% of your dependencies will be pulled in from Maven oriented sources, so you still have to deal with Maven's deficiencies around dependency configurations.
Re:Maven is broken by design by smrtinsert on Saturday October 05, 2013 @10:43AM (#6500783)
how so? you can even use regexs easily to specify which transitive deps you don't want. what are you missing?