3 ms·
> I feel like most people just hate Maven because of XML I see this a lot. I definitely don't want to go back to the days of J2EE/Hibernate XML hell, but there
by suresk 10y ago
> I feel like most people just hate Maven because of XML
I see this a lot. I definitely don't want to go back to the days of J2EE/Hibernate XML hell, but there are places where XML isn't terrible, and Maven feels like one of them - it is easier to figure out context when in bigger files (as opposed to JSON and the like), and it is nice that you can get very easy/quick feedback about the structure of the document via XSD. But when I ask people why they hate Maven, they give some handy-wavy "but XML..." argument about it.
I understand some of the more valid knocks against Maven, and there has been a time or two where I've been frustrated with it, but most of the time I used it (and I used it over a period of 8 years or so), I've been happy with it. I know that tools like Gradle and SBT allow you to do more, but I've always come away frustrated when using those tools.
- vroombaprime 10y agoThings I love having in gradle: * custom tasks AND up-to-date checks for them (for when you invariably need special tasks like custom generated code, filtering only some resources in a certain way, calling other build systems like grunt/gulp, etc) * up-to-date checks in general * better task exclusions * better dependency version resolution abilities, including custom strategies * groovy syntax Things I think maven does better that matter to me: * classifier handling (it is really frustrating gradle still has a lot of messed up handling of them) * way less magic is possible in the buildscript - makes it easier to trace through End result: I could never go back to maven, every single project I've worked on has desired custom tasks and maven just makes it painful every step of the way. The only thing I worry about in gradle is making things easy to understand so someone else can follow behind - can't use too much magic.
- snuxoll 10y agoWhat's the opposition to simply writing a Maven plugin versus tossing a bunch of extra logic in your build configuration? I understand there's some extra ceremony around it (you have to write a new project, publish the plugin to a maven repo or install it in your local .m2) - but I find it's a much cleaner and reusable solution than having a bunch of custom tasks dangling around build scripts.
- vroombaprime 10y agoThe custom tasks are never reusable - they are specific to that one build. If they ARE reusable they become gradle plugins, same as in maven. Effort of banging out a custom task to make a tar in a particular way and get it published: gradle=a few lines of groovy, maven=a full plugin in java? To be fair my maven experience is the lowest of all (between gradle/ant/make/maven), but I was being honest in that I would never want to go back to maven (or ant) - I get more things done faster in gradle. What MrBuddyCasino mentioned about mediocre teams though, that is a real risk. I'd nominate one or two skilled people to create and maintain it, but be sure to crosstrain and use comments liberally. The initial learning curve on gradle can be brutal for complex projects.