Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is Maven (or Gradle, but I prefer Maven) bad? I've never used npm, but I quite like Maven's use of XML for defining project dependencies etc. with clear structure.


I have very little experience with Maven, but I find it hard to understand and restricting. Maybe I should take the time to learn the fundamentals properly and maybe I would be enlightened, but it seems to work very different to other build tools.

Example "Lifecycles" [0]. The documentation says "Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined." The first sentence just says "this is important!". I have no idea what that second sentence is supposed to tell me. The documentation goes on without a clear definition what a lifecycle is. I figure it is a kind of command. Afterall, the basic lifecycles are "default" which is "make all", "clean" like "make clean", and "site" like "make docs". I'm not sure, there is no good definition of "lifecycle" in the documentation there. Hard to understand.

Well, there is a predefined set of lifecycles and each lifecycle has a predefined list of phases, where stuff can hook into. For example, with java the compile phase will turn my java files into class files. The test phase will turn class files into test reports. Recently, I wanted to merge multiple coverage reports [1]. Turns out, this is done in a compile phase, which is reasonable. However, the reports are generated in the test phase, which is after the compile phase. At this point, I'm lost. This corset of phases is restricting me.

[0] https://maven.apache.org/guides/introduction/introduction-to... [1] http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html


Spot on. As a Java developer, i've bounced around between Maven, Gradle, and ad-hoc shell scripts (and Ant back in the day!), and just cannot understand how so many people still think Maven is any good. It's not the XML - that's a superficial annoyance. It's the elaborate but extremely rigid model of what a project is and what a build is, that makes even the smallest deviation from a completely vanilla project excruciatingly painful.

Gradle has all sorts of failings, and is overly complex in its own way, but at least it gets the meta-model right: provide fundamental tools for building a graph of tasks with dependencies between them, and ship a set of hopefully useful tasks built on top of that.


Because that rigidity excels when you have a Fortune 500 project, distributed across 4 development sites across the globe, with 100 developers of multiple consulting companies developing several modules.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: