I am using Ant (Java based build system) for our project. Ant is an exceptionally powerful build system and should be the only build system you will ever need. You don't really need code monsters like Maven (or pile of …. as Bileblogger loves to say). With little effort here's what I achieved in few hours (aside from the obvious capability of compiling, running, building jar files etc.):

  1. Our test sources (Java) are located in the same directory as the regular Java source files. However during compiation of the source code we exclude the Test sources.
  2. The test sources can be compiled with a separate target which keeps the compiled classes in separate directory.
  3. Automatic static analysis to discover defects in the source code, report is in html for easy viewing.
  4. Javadoc with cross-refernce to source code and JDK classes are linked to JDK documentation on our local server.
  5. Source code quality analysis and report in html format.
  6. The run target allows you to run any class from command line with optional arguments (from command line).
  7. The libraries are grouped in several categories so only the minimal set of required libraries are used for each task
  8. Spike classes can be run separately
  9. The test task runs all the available sanity tests. You can specify any groups or exclude any groups of test to run.
  10. Many tasks like static analysis, javadoc creation or quality analysis are dependent on successful running of the sanity tests
  11. Before compilation the latest code is checked out from the subversion repository (called update in subversion). This ensures that the developer is always using the latest code base.
  12. All source code (including test code) and spike solutions are automatically added before checkin.
  13. You can checkin code (called commit in subversion) only after successful compilation and completion of sanity tests. This ensures that the checked in code is never broken.
  14. We also generate a jar file for a sub-project by concatenating the source along with all dependent jar files for easy of deployment. It also includes a manifest file which allows the application to be run with a simple java - jar command.
  15. Capturing the subversion version number for incorporating in jar file
  16. 'all' task which completes all common tasks
  17. Certain tasks are hidden from common users

While each of them is not hard to do, a nice integration is what gives it real value. A development team can be very productive with a build system which eases its tasks and enforces good habits like running tests before checkin, updating to latest version before compilation etc.

Instead of investing in big hard to understand systems, I prefer to use simple but powerful software like ant to get what I want and with low cost (my time * hourly rate as opposed to software cost + my time to learn * hourly rate + my time to implement + hourly rate + consultants time * hourly rate). Ant can be used from command line (my preference) or from within modern IDE like Eclipse or Netbeans.