Live data from Hacker News

Why Everyone Eventually Hates or Leaves Maven

nealford.com

21–30 of 168 posts

Re: Why Everyone Eventually Hates or Leaves Maven

#21
post #9

Spot on post. Last year replaced a maven shitfest with an old fashioned Makefile which calls javac and manual dependencies. The whole port process took about 2 hours. Integration and test run time has gone from 7 minutes (to drag all the maven plugins and dependencies down) to just over two minutes. This saves us a fortune on build agent capacity as well (we use TeamCity).

You can always run maven offline.

Re: Why Everyone Eventually Hates or Leaves Maven

#23
I totally agree with the article. I love somethings about maven but XML is a pain to work on.

I am thinking that a build system can be built on top of Java. But Java for shell scripting has some drawbacks that can be alleviated. I am working on these little tool to use regular java for shell scripting, it is auto compilable and it has better abstractions for file manipulation. https://github.com/huherto/jashi

Re: Why Everyone Eventually Hates or Leaves Maven

#24

I'll take rigid maven any day. Much preferable to some cobbled together build system that is undocumented and hard to reliably reproduce. I'm curious what people are doing with Maven that they manage to get into such a fight with it? Although to be fair, due to issues in its dependency resolution mechanics, it can pull in incorrectly versioned artifacts without ever telling you anything.

How are you ending up with anything other than the version you specify? Dependency mismatches on versions?

More info, including an example of Maven itself shipping with mismatched versions: http://jira.codehaus.org/browse/MDEP-273

Depending on how bad the mismatch is and how carefully people maintain or break APIs between versions, it can introduce problems.

I've not been into Java enough recently to know if this is fixed or is still affecting Maven3.

Re: Why Everyone Eventually Hates or Leaves Maven

#25
post #3

I don't hate Maven, and I haven't left it yet. But he is absolutely correct about the key observation: a basic tool with "plugins" is simply NOT the way to create a build tool. A built tool should allow (when needed) the full flexibility of a Turing complete programming language. Because eventually your project is probably going to need it.

You should take a look at http://www.gradle.org/ if you haven't already. I worked on an ant project and decided we needed to convert to a better build system. I started down the path of Maven, but Gradle changed my mind because of the conciseness. It uses the groovy language so hopefully it doesn't fall into the same trap as described in the post.

Gradle has given me a lot of headaches for small projects. I keep going back to it now and then and run into performance issues with it where builds that take 10 seconds in Maven take 10 min in Gradle.

It's something about the dependency resolution mechanism. Something is broken, but I haven't been able to pin-point it yet.

It's frustrating because I love Groovy. I write a lot of Groovy and I'd love to use a Groovy-based build tool, but I can't justify wasting a lot of time on Gradle when I know how to do what I need to do in Maven.

Re: Why Everyone Eventually Hates or Leaves Maven

#26
post #9

Spot on post. Last year replaced a maven shitfest with an old fashioned Makefile which calls javac and manual dependencies. The whole port process took about 2 hours. Integration and test run time has gone from 7 minutes (to drag all the maven plugins and dependencies down) to just over two minutes. This saves us a fortune on build agent capacity as well (we use TeamCity).

Exactly. I am not sure what maven people are looking at. I too have gone out of my way to not use maven.

I am really good at make and reasonable at ant. If you cant build a java project with those then you are the problem not the build system.

Re: Why Everyone Eventually Hates or Leaves Maven

#27
post #3

I don't hate Maven, and I haven't left it yet. But he is absolutely correct about the key observation: a basic tool with "plugins" is simply NOT the way to create a build tool. A built tool should allow (when needed) the full flexibility of a Turing complete programming language. Because eventually your project is probably going to need it.

  A built tool should allow (when needed) the full 
  flexibility of a Turing complete programming language. 
  Because eventually your project is probably going to need 
  it.
I've never seen a situation like this - but perhaps I've lived a sheltered life. Can anyone give me an example of when this would be a good design decision?

Re: Why Everyone Eventually Hates or Leaves Maven

#28

I managed to do my entire Java career by dodging Maven but I'm now learning Clojure and I really like the language but, sadly, I'm not fluent enough in Clojure to do everything "by hand" so I'm using Leiningen... And Leiningen uses Maven under the hood :-/

Leiningen doesn't use Maven under the hood. It understands the Maven repository format, and imports a few classes from Maven for searching Maven repos, but that's pretty much it.

Re: Why Everyone Eventually Hates or Leaves Maven

#30
post #4

It's a trade-off, right? As most things in software are. Recently, I inherited a project that had 10,000s of lines of ant scripts. Resource constrained, I didn't have anyone to maintain that build process. So, I took a few hours and converted those projects to several hundred lines of maven 'scripts'. Now, it works way better than the previous system, because now I can have a person focused on coding features, rather…

> maybe grails is the right answer

The poster probably means gradle. I am not pointing this out to be pedantic, but because it's not a given that every reader will know their way around the universe of build tools.

Post reply on HN