Chapter 4. Deploying Builds
This chapter starts coverage of one of the things Ant does best:
deployment. This chapter covers tasks to package applications for
deployment like tar, gzip, and zip; tasks to prepare directories for deployment
like delete and mkdir; and tasks to deploy applications like
copy and move for local and network deployment, as well
as ftp, telent, sshexec, and mail for remote deployment. You'll see other
deployment-related tasks, such as touch
to set the deployed files' modification dates to a specific value (as is
done for commercial software deployments), fixcrlf to fix text file line endings (as in
readme, .sh, .bat,
.html, or .ini files) for
different platforms, and more. Finally, you'll learn how to handle build
automation, setting up builds to run on their own, at a schedule of your
choosing.
Tip
There's more on deployment coming up in this book. Ant has a lot
of support for deploying web applications, so much so that it'll take
more than just this chapter to cover. Chapter 8 covers how to package and
deploy web applications, including using get (used to send administrative commands to
web servers remotely), serverdeploy,
war, and other Ant tasks designed to
load web applications to various servers. Chapter 8 and part of Chapter 9 also specifically discuss how
to deploy to Enterprise JavaBean© (EJB) application servers.
Packaging Applications for Deployment
We're going to start with deployment tasks designed to
package applications for deployment: tar