4 ms·
It's undeniable that maven can do much more things that other dependency managers, like setting IDE configurations for instance, but that does not make it bette
by _lce0 11y ago
It's undeniable that maven can do much more things that other dependency managers, like setting IDE configurations for instance, but that does not make it better.
Do you think it's better than the likes of npm, bower, or composer? where you just say: give me all these things, with at least these versions, and could you please run these scripts also --all at once, in about 30 lines
Every time I want to use mvn I need to start for google .. which was the archetype parameter that I needed?
or so let's run this not-so-common target, no problem I have 5 minutes for a coffee while it downloads all the requirements .. then 5 minutes later says "missing parameter"
- lmm 11y ago> Do you think it's better than the likes of npm, bower, or composer? where you just say: give me all these things, with at least these versions, and could you please run these scripts also --all at once, in about 30 lines of plain text. Yes. "Run these scripts" leads to snowflake builds: every project ends up slightly different from every other, no-one can resist putting a little "magic" in their build that then goes on to confuse future developers. Requiring every build step to be encapsulated as a plugin, so that there's one and only one way of putting the scm version in your build, one and only one way of bundling your app into an executable, and so on, makes everything much more maintainable. > Every time I want to use mvn I need to start for google .. which was the archetype parameter that I needed? You don't need archetypes if you find them problematic. Just start with a minimal pom: groupId, applicationId and version. That's not so hard is it? > or so let's run this not-so-common target, no problem I have 5 minutes for a coffee while it downloads all the requirements .. then 5 minutes later says "missing parameter" Either you share your build steps, which means downloading them sometimes, or you copy/paste them everywhere. I know which I prefer. Maven caches quite aggressively (if anything too aggressively), I'm not sure what more it could do.
- jjnoakes 11y agoRunning scripts doesn't imply "snowflake builds" - one can just as easily write duplicate plugins that are a mess, and one can also just as easily write encapsulated scripts that do one job and do it well. It's all about the quality of the developers.
- lmm 11y agoIt's not "just as easy". A maven plugin is necessarily a maven module, a first-class module like any of your libraries; unless you go out of your way to make it not, it has versioning, tagging and the like. Even more importantly, since the plugin itself is built with maven, it naturally has dependencies and unit tests, arranged in the same familiar structure as the rest of your code. Everything guides you towards good development practice; of course you could manage your scripts in the same way, but you'd have to do so by hand, and with the best of intentions I've never seen any team that used scripts have the discipline to manage them properly. Good developers can make good things with bad tools and bad developers can make bad things with good tools yes, but even so, tooling and defaults are extremely important.
- jjnoakes 11y ago> I've never seen any team that used scripts have the discipline to manage them properly And I'll throw in my personal experience too, which is the opposite: I've never seen any team that used Maven and had the discipline to manage it properly. Anecdotes don't really get you too far.
- Feeble 11y agoUnfortunately this is pretty much the problem you will get. It doesn't have to be about good or bad developers, even good developers will start to apply their own flavor and smart solutions in the build scripts and you will end up with very different way of doing things. Anyone remember using Ant with Java? Same thing I would say. Maven is convention over configuration for a reason.
- maaaats 11y agoI actually somewhat like the XML configuration of Maven. Smart auto-complete in IntelliJ is fantastic. In many JS tools they use a JSON file for configuration, which means one cannot even add comments in the file. And grunt/gulp is worse than Maven, no way you can do anything without writing a custom script with the help of Google.
- richmarr 11y ago> Do you think it's better than the likes of npm... "Better" is a word I don't like, but NPM failed to learn lessons from some of the aspects of dependency management that Maven nailed, e.g. support for standard HTTP caching proxies, immutable versioning. NPM ran for many years before they switched off the ability for module publishers to overwrite an already published version number with new code.