February 10, 2005Ant and Maven
I was going to post a comment on Dion's blog about his entry on Maven when I realized that Mike posted it for me... In short, ant's <import> and <macrodef> are absolute life savers. They have brought a lot of sanity into my build files, which I thought were already pretty lean and mean:
These rules of thumbs coupled with the following simple guidelines:
... give me a feeling of empowerment and control over my infrastructure. Another important point is that I only need to know two languages to find my way in ant (Java and ant's XML) while Maven requires me to learn four different languages: Java, ant's XML, Maven's XML and... gulp... Jelly. I still like the idea behind Maven but even today, when I see that the same criticisms we were hearing two years ago still crop up on a regular basis, it doesn't make me very confident on my ability to diagnose Maven meltdowns. Posted by cedric at February 10, 2005 11:15 PMComments
Would you mind sharing your build scripts? I suppose you must have "template" scripts for new projects... Posted by: Daniel Serodio at February 11, 2005 07:43 AMYes, I looked into Maven recently and wondered if the overhead of learning it (and teaching it to the employees where I consult) would be worth it. When I saw Jelly as the scripting language I dropped the idea completely. Scripting in xml just doesn't seem like the best idea. I haven't played with ant macros yet but the import saved my butt on my last project which had many modules. If you are allowed to share some of your macro templates please do so. Posted by: George Coller at February 11, 2005 08:33 AMCheck out Savant. It gives you dependency management even better than Maven's (it finds the transitive closure of dependencies if you've specified the dependencies of your dependencies, etc), plus it lets you keep your Ant build with just a few additions. Posted by: Jason Carreira at February 11, 2005 10:55 AMCheck out the build setup that Howard has created for Hivemind called Hivebuild. He uses macrodefs fairly extensively. Posted by: Bruce Snyder at February 11, 2005 08:07 PMOn the Maven userlist, Jason said that maven 2 will drop Jelly in favor of plain old java and other, better xml scripting languages. Posted by: Geoffrey at February 12, 2005 09:06 AMI doubt Maven 2 will ever see the light. Too much energy has been spent in more than 2 years to create chaos. If they create a version 2 it will be incompatible with version 1 (even with micro releases it was already hard to have somewhat backward compatibility) and it will make existing Maven builds and the loadcrap of plugins complete history which is not what people want to heard. But Maven people like to mess around the build all the time, so sure again they will convert existing build 1 version to version 2 alpha pre release to create more havoc. :) Posted by: at February 12, 2005 09:42 AMI really like the concept of Maven. While the execution does fall short in some areas with Maven 1 I do hope it provides impetus for other projects to create a higher level build system on top of Ant that provides a default means of dependency management, multi-project relationships, and generation of build artifacts such as jars, wars, and ears. Perhaps it's Maven 2 or perhaps someone creates a suite of Ant macros. Either way there's a real need for higher level build systems to enable people to jumpstart their projects. I don't want to have to maintain "my" set of macros to build build source, run unit test, and generate a WAR when every other company out there is doing it in almost the same way. I want to see reuse on the inter-company level and that I believe is the aim of a high level build system such as Maven. Posted by: Todd Huss at February 13, 2005 07:21 PMWith Ant you have to have people who can code in Ant, and are happy with XML. With Maven you just need people who are happy with XML. Yes you can extend Maven with Jelly, and you can extend Ant with Java, but for most projects you shouldn't need to. Posted by: Henri Yandell at February 17, 2005 06:47 PMCedric - Thanks for the pointer to the macrodef and import tags. I have used this knowledge to create the first video game written in Ant. It has a nice skiing theme. http://jonaquino.blogspot.com/2005/02/first-video-game-written-in-ant.html Posted by: Jonathan Aquino at February 25, 2005 01:28 PMPost a comment
|