I\'m looking for a make utility for building large java programs. I\'m aware of ANT already, but want to see what else is available.
Ideally, it should be able to handle
I use ANT all the time. This is because i develop web applications using Google Web Toolkit (GWT) which has an extra step of compiling client side java into java script. With ant, all i needed to know is how GWT works and then i orchestrate the build myself. With maven, i have to wait till someone writes a plugin. or i write one myself. There is a possibility that other frameworks and tools that dont follow the usual conventions will come up. i dont have to keep looking for maven plugins all the time. With ant, i can do whatever i want in a transparent manner. I also enjoy writting xml files. (i have to because i have to write several - web.xml, application.xml, persistence.xml, SqlMap.xml, dataset.xml e.t.c. My point _ XML is one thing you have to learn to like)
I converted from Ant to Maven 2 and have not looked back since. Ant and Maven 2 different ways of building.With Ant you are giving instructions on how to build things. Whereas with Maven 2 you tell it what you want built. If you have an existing Ant build,xml you can take a first step in refactoring you build by wrapping that in an Maven 2 pom.xml.
Forget ANT!!
Apache Maven is the way to go if you ask me.
The feature i like the most is it built in in dependency management. This means you dont have to check 3rd party JARs into your source control project.
You specify your dependencies in the maven POM (Project Object Model - Its basically an XML description of your project) and maven automatically downloads, compiles against them and packages them with your app.
Other really nice features are: Release management and distribution publication - Perform releases using maven console commands. This feature will tag your code base in source control. Checkout a clean copy, build it & package it for deployment. A second command will upload it to your repository for distribution to other end users.
A large and growing repository of libraries already using maven - EVERY Apache project uses maven. LOADS more are on board also. See for yourself, here's the main repo
Ability to host your own repo. - Where you can release your own builds and also upload JARs that dont exist in other public repos (like most SUN jars)
ant has been the leader for years. But its build.xml being, well, xml-based, it is very verbose. Dependency management can be achieved by coupling it with ivy.
maven strives to provide out of the box what the ant+ivy tandem provides, it is nice while it works. If it stops doing that and you have to find out where it messes up with dependency management, it may very likely be the worst hell you can imagine. Also it's pom.xml... is written in xml.
sbt is the royal scala build tool, uses ivy for dependency management, and the build files are writen in a scala DSL. Quite mature, but the scala dialect may not be to your liking.
buildr build files are specified in ruby. Compatible with maven repositories and brings it's own dependency management. Ant integration is there, too.
gradle uses groovy for its build files. Beside maven or ivy support it has it's own dependency manager now after having used ivy in the past and not being satisfied. Seamless ant integration. Has the easiest syntax by far.
ant, ivy, maven, buildr are apache projects.
TL;DR
Check gradle or buildr.
Unless Maven has really improved recently, I'd steer well clear of it. Unless you have some kind of monster "multi-project" with a gazillion dependencies of course.
After getting sick of looking at completely useless and unhelpful errors when attempting to do the simplest things (like FTP a war
file to a server), Maven was thrown away and Ant dusted off. I haven't looked back since.
1) ant + ivy is pretty good if you have existing investment in ant. You don't have to move from ant to maven just for the dependency goodies.
2) gant and ant : how do they compare : http://java.dzone.com/articles/ant-or-gant-part-1
3) http://www.gradle.org/ -- uses groovy!
BR,
~A