Building with Ant: Deployment and Distribution

We wrap up our lessons on working with this open-source development tool from the Jakarta Project by looking at some advanced issues - multiple deployment targets, versioning, and source distribution.

provided by: 
Originally published at Internet.com


"Ah, to build, to build!
That is the noblest art of all the arts."
- Henry Wadsworth Longfellow

Review Part 1

Review Part 2

In this installment, we discuss issues of deployment and distribution. We are continuing to use the build.xml file from a real, working Web application - please download it and follow along.

Deploying Locally



These days, it is trivial to run a servlet container on your workstation. This should be your first line of deployment. Before you push your application to any other servers, you should deploy it locally and look it over. (It is also a good idea to run acceptance tests on the locally running site, using a test framework like HTTPUnit.)

A Web application is just a bunch of files in a directory. At its heart, deployment is simply a matter of copying those files to the right place and letting your servlet container know that you've done so.

In the case of a local servlet container, the first step - copying the files - is already done! Remember, our webapp target created a directory inside of build that contains all the files of the Web application. All we need to do now is tell our servlet container where these files are. For Tomcat, that's as easy as adding a single line to TOMCAT_HOME/conf/server.xml: ...

Read article at Internet.com site
Related Articles
- Building with Ant: Introduction
Developing Web applications using Java Servlets, JavaServer Pages, and other J2EE technologies is fun! See how to avoid many of the common growing pains of application development by using simple tools, like Ant and JUnit, and a simple directory structure.
- Enterprise JavaBeans: Helper Classes
- Evolving Success Factors for Application Servers
- Axis2 Information Model
- User Code: A Color Calculator
- Building with Ant: Directory Structure
- An Overview of Cryptography in Java, Part 3: Writing Your Own Provider
- Enterprise Deployment Environment with Java Spring
- Server-Side Development on Mac OS X: Servlets and Tomcat
- Access COM Via Java - A Tutorial
Regional Articles
- Building with Ant: Deployment and Distribution Alabama
- Building with Ant: Deployment and Distribution Alaska
- Building with Ant: Deployment and Distribution Arizona
- Building with Ant: Deployment and Distribution Arkansas
- Building with Ant: Deployment and Distribution California
- Building with Ant: Deployment and Distribution Colorado
- Building with Ant: Deployment and Distribution Connecticut
- Building with Ant: Deployment and Distribution DC
- Building with Ant: Deployment and Distribution Delaware
- Building with Ant: Deployment and Distribution Florida
- Building with Ant: Deployment and Distribution Georgia
- Building with Ant: Deployment and Distribution Hawaii
- Building with Ant: Deployment and Distribution Idaho
- Building with Ant: Deployment and Distribution Illinois
- Building with Ant: Deployment and Distribution Indiana
- Building with Ant: Deployment and Distribution Iowa
- Building with Ant: Deployment and Distribution Kansas
- Building with Ant: Deployment and Distribution Kentucky
- Building with Ant: Deployment and Distribution Louisiana
- Building with Ant: Deployment and Distribution Maine
- Building with Ant: Deployment and Distribution Maryland
- Building with Ant: Deployment and Distribution Massachusetts
- Building with Ant: Deployment and Distribution Michigan
- Building with Ant: Deployment and Distribution Minnesota
- Building with Ant: Deployment and Distribution Mississippi
- Building with Ant: Deployment and Distribution Missouri
- Building with Ant: Deployment and Distribution Montana
- Building with Ant: Deployment and Distribution Nebraska
- Building with Ant: Deployment and Distribution Nevada
- Building with Ant: Deployment and Distribution New Hampshire
- Building with Ant: Deployment and Distribution New Jersey
- Building with Ant: Deployment and Distribution New Mexico
- Building with Ant: Deployment and Distribution New York
- Building with Ant: Deployment and Distribution North Carolina
- Building with Ant: Deployment and Distribution North Dakota
- Building with Ant: Deployment and Distribution Ohio
- Building with Ant: Deployment and Distribution Oklahoma
- Building with Ant: Deployment and Distribution Oregon
- Building with Ant: Deployment and Distribution Pennsylvania
- Building with Ant: Deployment and Distribution Rhode Island
- Building with Ant: Deployment and Distribution South Carolina
- Building with Ant: Deployment and Distribution South Dakota
- Building with Ant: Deployment and Distribution Tennessee
- Building with Ant: Deployment and Distribution Texas
- Building with Ant: Deployment and Distribution Utah
- Building with Ant: Deployment and Distribution Vermont
- Building with Ant: Deployment and Distribution Virginia
- Building with Ant: Deployment and Distribution Washington
- Building with Ant: Deployment and Distribution West Virginia
- Building with Ant: Deployment and Distribution Wisconsin
- Building with Ant: Deployment and Distribution Wyoming
Related Articles
- Building with Ant: Introduction
Developing Web applications using Java Servlets, JavaServer Pages, and other J2EE technologies is fun! See how to avoid many of the common growing pains of application development by using simple tools, like Ant and JUnit, and a simple directory structure.
- Enterprise JavaBeans: Helper Classes
- Evolving Success Factors for Application Servers
- Axis2 Information Model
- User Code: A Color Calculator
- Building with Ant: Directory Structure
- An Overview of Cryptography in Java, Part 3: Writing Your Own Provider
- Enterprise Deployment Environment with Java Spring
- Server-Side Development on Mac OS X: Servlets and Tomcat
- Access COM Via Java - A Tutorial

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML