ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Rodriguez <>
Subject using ant in the deploy process
Date Tue, 18 Sep 2001 18:56:58 GMT
I've been using Ant to optimize my build and deploy process.  So far, the
build process is working great with Ant.  However, I've run into some
trouble with the deploy part.  In all the documentation, it's very clear
that Ant is a java-based BUILD tool.  However, after the build is done, does
Ant have the tools in order to deploy?  Or are there other tools, possibly
from the Jakarta project, that are better equipped to handle deploys?

The specific reason I ask is that I need to deploy to multiple boxes.  After
my build is done, I have a cabinet (folder) with all the java classes and
asp for my site.  Then for the deploy, I need to deploy this cabinet to
several boxes.  Is there a way to deploy to several machines using ant?
Since ant has no for, while, or array constructs, I figured it was not
possible.  But then I saw the script task and in there one can use the bsf
supported scripting language of choice.  However, I didn't see a lot in the
way of documentation for how to write script tasks.  So would something like
this be possible?


<target name="deploy_sites">
  <script language="perl">
	@sites=qw/site1 site2 site3/;
	foreach $site (@sites) {
		<antcall target="deploy">
			<param name="site" value="$site"/>

<target name="deploy">
	<!-- This target would copy,ftp,etc the files to the site machine

<target name="main" depends="deploy_sites">

This is what I would like to do, deploy to multiple boxes.  Has anyone done
these types of deploys using ant?  Any help would be greatly appreciated.


P.S. - I used Perl in this example because it was the scripting language I
am most familiar with.  If this can be done better by another scripting
language (JavaScript, netrexx, etc) then please let me know.

View raw message