I the process of refining our build, it became apparent that we could simplify new deployments a great deal by making ant do most of the setup work. You checkout the code, run a bootstrap task that does things like downloading library dependencies, fetching build-tool binaries etc.

This is not the reason we use ant, but could be a benefit; right now it does things like unit testing, coverage logging, SLOC counting, mess-detection, standards compliance, and so forth.

One step that would also help greatly, is being able to make that bootstrap check for and install OS-package dependencies. Something like:

```
1) Check OS
2) If recognized/supported, run (eg) 
    for Ubuntu: apt-get install curl apache2 libapache2-mod-php5; 
    for RedHat: run yum install -y apache curl-bin

```

Is there a way to do this? I know you can run arbitrary commands, but sudoing breaks that. Also, is there a reason this shouldn't be done even if it could be?