Ant (http://ant/.apache.org) is embodies simplicity, extensibility and never in your way software. A lot of developer tasks can be automated with this tool. For quite some time we used it to just build a WAR file and deploy it Tomcat on our desktop machines. Deployment to server used to be a one hour task. Build with the server configuration files, ftp to server, extract static stuff to apache, re-deploy the database and recycle the server.
We were able to automate the whole process in ant. I like the import feature where all common tasks are hived off into a common file and the front facing files can setup different config parameters as per deployment - desktop vs server.
<import file="${basedir}/build_common.xml"/>
Other feature I like is macrodef where in a task can take in parameters and use them inside the task. After the server specific war file is built, its time to ftp it to server.
<ftp password="password" server="amazon ec2 server" userid="userid"
remotedir="/rermotedir">
<fileset dir="${build.dir}">
<include name="${context.root}.war"/>
</fileset>
</ftp>
After the file made it to server, time to deploy it. All the commands for deployment are captured in a shell file on the server, so it just came down to invoking the shell script from ant.
<sshexec host="amazon ec2 server"
username="username" trust="true"
keyfile="amazon id_rsa-gsg-keypair"
command="deployment.sh ${context.root}"/>
All of it done under 20 mins and the new version of software is up and running.