4 ms·
I'm interested if anyone at HN has good things to say about Maven. I've only scratched the surface of it, but my initial impressions have been: * slow (even wi
by samstokes 17y ago
I'm interested if anyone at HN has good things to say about Maven. I've only scratched the surface of it, but my initial impressions have been:
* slow (even with -o to stop it downloading the internet every time)
* incredibly verbose, in both configuration and output during builds
* inflexible (but I've not really looked into plugins or advanced configuration)
* opaque and thinly documented even for basic needs
I did a fair amount with ant a few years ago and found it a much more pleasant experience. Maven seems to me stereotypical "enterprisey" software: a mediocre, moderately complex solution to an extremely complex problem.
- dcminter 17y agoMaven's main strength is standardization of the build combined with the dependency management that makes it easy to get a build going instantly without having to explicitly download libraries. "slow" - can't say I've found that an issue when compared with Ant which I used to use. "verbose" - in configuration I disagree - the more you put in your pom the less well you're using it. In output true, but I'm not sure why that's intrinsically a problem for you. "inflexible" - absolutely not true. You can configure a plugin and Maven will go and download it for you - so as a user you can enhance the tool directly from the configuration file (e.g. I typically use a plugin to build database scripts from annotated classes). "opaque" - yes, but there's method in that madness. It's programming by exception (how is my project different from the default?") as opposed to Ant's (mainly) explicit programming ("How exactly is this build bootstrapped?") Once you know the pro forma you can jump into any Maven project with an immediate understanding of its likely structure - very different from Ant where you basically need to read the build.xml files to know where everything lives. "thinly documented" - Yep. The documentation is horrible and that's its biggest problem in my opinion.
- mthomas 17y agoI've found maven to be useful. It standardizes the layout for the majority of java based projects. It also lets me deal with dependencies in a decent manner. Maven should not be downloading dependencies on every build unless you are using SNAPSHOT versions. There is a free book available: http://www.sonatype.com/products/maven/documentation/book-defguide http://www.sonatype.com/products/maven/documentation/book-de...
- samstokes 17y agoThanks very much for linking to the book - that will be very useful. (I know Maven doesn't actually redownload everything each time, but it does seem to do something on the internet every time I build without -o; and even with -o, it still seems slow to get going. Might be project-specific / PEBCAK error though.)
- caustic 17y agoYes, Maven is a great tool in my opinion. With automatic dependency management and IDE integration it makes my life so much easier. When I'm justifying including a third party (open source) library I ignore those that are not build with Maven and whose artifacts are not installed in the central repository. * slow (even with -o to stop it downloading the internet every time) At least you don't have to download everything manually, which is far, far more tedious. I'd rather let it to the tool to download dependencies. * incredibly verbose, in both configuration and output during builds I bet the simplest pom file will be shorter than the equal ant build script. And I personally don't care about output verbosity. * inflexible (but I've not really looked into plugins or advanced configuration) You can easily extend maven builds with ant scripts, which makes Maven as flexible as Ant. *opaque and thinly documented even for basic needs That may be the real issue.
- minalecs 17y agoAnother maven user here.. and Ill tell you why its better than ant. Yes the convention over configuration is the reason. I can look at project structure, and know exactly where to find everything download dependencies and be up and productive in little time. Working at several different companies, with ant, you will find that different structures, trying to figure out where to get dependencies.. etc. Higher cost to start 2. The dependency issue the author is talking about( and seems like his main issue) is false. You should have a dedicated private repository like archiva, and you will never have issues. Just like large projects have a build manager, you should be managing dependencies yourself. 3. Very configurable, there are plenty of plugins, and you can write your own. 4. verbose ?? obviously you haven't see some major ant scripts. But yes it can get large in a single large project but the design convention would be to have a common pom, and break your project into modules.
- zenocon 17y ago+1 for maven for me. I've used it quite a bit. I've set up (fixed) a lot of really, really bad Ant builds. I have nothing against Ant, but it is easily abused, and can quickly degenerate into a complex mess. Maven has a learning curve -- although it isn't huge. It can be frustrating sometimes, but if done right, it has so many advantages over other tools. There are free online books on the topic. http://maven.apache.org/articles.html http://maven.apache.org/articles.html