RE: Why use Maven
Warner has a post about why he likes Maven. He might not know it, but he's actually ripping on AppFuse, its directory structure, and build file. I like getting ripped on, so that doesn't bother me. What bother's me is that Warner has comments turned off so no one can get him back.
The main reason that AppFuse uses Ant over Maven is speed. Maven runs much slower than Ant. Period. Also, with an open source project like AppFuse - I try to appeal to the larger audience, who likely has Ant installed. Other OS projects I work on (displaytag and struts-menu) both use Maven and people have a lot harder time trying to build from source b/c of Maven issues. Lastly, I like having a complete download - rather than download-dependencies-after-you-download-the-project like Maven does. I realize if I did use Maven I could package the dependencies in the app - which is likely what I'd do anyway since the main repositories seem to be constantly out-of-date.
Recently, I had a similar experience to Warner. As part of my current contract, I was tasked to write a couple of Maven sample apps. Warner came to my rescue and helped me out a lot, but I felt like I was jumping through a lot of hoops to do simple stuff that was already done in the Ant version of my app. I guess I'm just not a Maven guy. A project that's done right, regardless of if it's done with Ant or Maven, should build by typing "ant" or "maven" - or at least provide you help on what you need to type. Some projects, like Spring and Struts, actually allow you to use either one out-of-the-box. That's a pretty cool idea and likely keeps everyone happy.
It sounds like Warner has re-worked AppFuse to work with Maven. Care to donate your couple hours of work? I wouldn't use it personally, but there has been interest in a Maven version. Some folks seem to like slow build tools.
Posted by 66.167.118.157 on August 04, 2004 at 11:35 PM MDT #
Let's test the "Maven is as fast as Ant" theory. I have a couple of small projects with the same source source code - one Ant based and one Maven based. Here's the numbers for particular targets/goals to compare (I cleaned before running each one): <ul class="glassList">
Numbers don't lie. Granted it's not that significant, but I'll take any additional efficiency I can get out of this PowerBook. ;-)
I've heard of Maven Console and also Ant Console. I haven't tried the Maven one, but the Ant one was buggy the last time I tried it.
Posted by Matt Raible on August 05, 2004 at 12:02 AM MDT #
Posted by Hani Suleiman on August 05, 2004 at 12:08 AM MDT #
Posted by Warner Onstine on August 05, 2004 at 01:06 AM MDT #
Posted by Warner Onstine on August 05, 2004 at 01:07 AM MDT #
Posted by Jason Barker on August 05, 2004 at 01:34 AM MDT #
It's not that hard - drop the JAR(s) into a directory in lib, add an entry to lib.properties and then add them to the appropriate classpath in properties.xml. I agree that it's more complicated than Maven, but this is the system I use. The nice thing is you can actually move the "lib" directory into a parent directory and use it for more than one project. On most projects, the packages I'm using are set w/in the first week, and then it's just a matter of dropping in new JARs and changing the version number in lib.properties.
Posted by Matt Raible on August 05, 2004 at 02:36 AM MDT #
I'm starting to see Maven as one of these things that people either love or hate. I'm not sure if that's a good sign or not.
To each his own. Maven is in no way as fast as Ant. It's dog slow in comparison, but that really has no effect on my choice to use it heavily. It saves me a ton of work. Period.
Maybe some people do like slow build tools, but I find your comment strange, nonetheless. To simplify the Maven/Ant comparison to "Ant is faster, so I'll use Ant" seems a bit numb to me.
Ant 1.6 is awesome, with the macros and inheritance/inclusion system. I tried it out and was pleasantly surprised. But I don't want to write any build files anymore, unless I have to. I'd rather just let Maven do the work for me.
Hani, it's true that Maven-generated Ant build files have problems. I tried it a few times, it kept putting absolute paths in there, so I stopped. Annoying. But your anti-Maven FUD continues to possess a very low signal-to-noise ratio. You just yell about how it sucks, but don't really say anything significant. But you are very funny, so at least your comments serve some purpose in that regard.
Uh, a lot more than 3 people use Maven. Have you seen the mailing lists? Probably not. But a lot more people use Ant, definitely. But that alone doesn't make it better -- I think we all know this.
Anyway -- I'm not a Maven groupie or anything, I just like it. If a better tool came along I'd use it.
Posted by matth on August 05, 2004 at 03:21 AM MDT #
Posted by Scott Williams on August 05, 2004 at 01:14 PM MDT #
I agree that Maven is slow (very slow), but we tend to use Maven for the deployment process (creating a WAR file), whereas during development we use Tomcat & Eclipse. That way (using a shared classpath) we have instant code recompilation when developing. So there is no need for an external build tools like Maven or Ant during the development cycle; a separate machine with a cron-job makes sure the Maven deployment ("maven site") is done every hour or so. So in that sense a few seconds more or less are not that important.
I'd love to see Maven and AppFuse coming together -- but of course, keeping 2 separate build mechanisms in place will require time and effort.
Posted by Guus Bosman on August 05, 2004 at 02:28 PM MDT #
So, I would be of the opinion that if all you need is a build tool, then ant is the way to go. If you need a build tool, a site doc tool, then maven is probably the better solution.
Having said that, I'm moving from maven to an ant/forrest solution for my chameleon project. I decided to use Forrest for documentation and I ended up using maven strickly for builds, which seemed overkill.
Posted by Robert McIntosh on August 05, 2004 at 02:37 PM MDT #
Posted by Eric Weidner on August 05, 2004 at 04:48 PM MDT #
I too am playing a little bit with Groovy (http://jroller.com/page/sftarch/20040802#dynamic_class_generation_groovy_vs) but I haven't looked at Groovy + Ant yet.
Posted by Robert McIntosh on August 05, 2004 at 06:34 PM MDT #
Posted by Carlos Sanchez on August 11, 2004 at 11:15 AM MDT #
Posted by Matt Moriarity on October 07, 2004 at 01:09 AM MDT #
Posted by Bryan Hunt on November 10, 2004 at 02:44 PM MST #
Re: "Maven also imposes some good practises standarizing folders layout and the 'one artifact per project' philosophy." One man's best practice is another mans bleedin' straight jacket. Maven is a classic golden hammer, and for its advocates everything, quite mysteriously, begins to look like a nail.
Re: "Maven is better than ant in documentation " Aha, at last the crux of the matter, maven makes pretty documentation; agreed, but its a bloody lousy build tool.
Re: "If you don't like maven suggestions you can make ant scripts and run them from maven" Why not just run ant then and cut out the middle man.
Posted by Mark Walker on November 30, 2004 at 03:21 PM MST #
Posted by David Thompson on December 29, 2004 at 08:12 PM MST #
Posted by Stéphane Mor on February 11, 2005 at 05:05 AM MST #
Posted by Naval Sarda on August 19, 2006 at 04:49 AM MDT #
Posted by Matt Raible on August 22, 2006 at 05:54 PM MDT #
Posted by Chui on February 26, 2009 at 10:49 PM MST #
Posted by cristi on July 07, 2009 at 05:50 AM MDT #
Posted by Sean Champ on August 24, 2009 at 09:08 AM MDT #
Starting from a certain practical perspective, I wish that either Maven 2 or Ant was easier to get started with, for automating operations using the Forrest tools - that being to the nature of my usage case. I'm familiar with Make and a certain Common Lisp build tool, one ASDF. Starting with that background, then just as honestly, and in my opinion: Ant looks like a hack for hacking the build process, and Maven like a hack for hacking dependency integration, build, and deployment. Not to burst anyone's bubble, but outside of the body politick about these things, none of it looks all too fancy, as I honestly see it.
I could really prefer to use Make, at this point -- at least it's consistently and completely documented, in a practically useful way, for the syntax of Makefiles - namely, in the single body of TeXinfo documentation about GNU make. As far as big projects using Make, then, I don't choose to ignore the precedents set of the Linux kernel project. I'm aware that that's a project in the C domain, but have we not all learned about Turing completeness and what?
Is it that tough to write more of concretely useful documentation about ant? I don't find all the opinions about it to be so useful, after all, and I'm afraid that I do not believe I can learn about it by osmosis. Comparatively, it seems to me that Maven is more comprehensively documented - even in so much as the single book, available online, Better Builds With Maven.
I will use Maven, then. However long it will take to determine, concretely, how Maven 2 would be used to automate the publishing of a web site, using Maven 2 to drive Forrest (by way of ant, as I guess it'll have to be, at least to start with) but - for all its quirks - I honestly believe that Maven 2 is the more thoughtfully designed tool.
Not to start a flame war, just taking it kind of seriously, over limited time. Cheers, then, folks.
Posted by Sean Champ on August 24, 2009 at 09:09 AM MDT #
Posted by Sean Champ on August 24, 2009 at 09:13 AM MDT #