ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Rodriguez <>
Subject RE: using ant in the deploy process
Date Wed, 19 Sep 2001 19:09:58 GMT
I would like to pass the servers to deploy to at the command line.  Then I
would like to have a task that I can use that would go thru the list and
deploy the files to each server.  I could write task for each and every
server that can get deployed to but that seems like a lot of repetitive work
for something that can be accomplished by setting a variable.
I guess what I am really asking for here is a list and a foreach loop.  I
looked thru earlier listings and saw that there is a foreach task out there.
Anyone know where I can get it?  Also, is there a list or array feature out
there for ant?  If so, where can I get that?
If there isn't a foreach and array for ant, does anyone know any good
resources for how to use the script task?  Or more specifically, how to use
the script task with Perl?

-----Original Message-----
From: Schaefer, Don []
Sent: Wednesday, September 19, 2001 8:30 AM
To: ''
Subject: RE: using ant in the deploy process

We use ant for our deployments.  It works very well.  FTP is fine.  Remember
that you can also pull a new revision from a remote location.  We use
filesets and naming patterns combined with jar to create our images.  We
have also made our update available internally on a webserver for retrieval
as well.

-----Original Message----- 
From: Pugh, Eric [
<> ] 
Sent: Wednesday, September 19, 2001 8:49 AM 
To: '' 
Subject: RE: using ant in the deploy process 

How do you copy to multiple servers though?  Just run the copy task a bunch 
of times?  Or can you use a fileset for the todir? 


-----Original Message----- 
From: Don Taylor [
<> ] 
Sent: Wednesday, September 19, 2001 7:45 AM 
Subject: RE: using ant in the deploy process 

Or even the humble copy task? That's how I deploy to multiple servers! 

-- Don 

--- Jason Rogers <> wrote: 
> Would the FTP task not meet your needs? 
> -----Original Message----- 
> From: Anthony Rodriguez [
<> ] 
> Sent: Tuesday, September 18, 2001 2:57 PM 
> To: 
> Subject: using ant in the deploy process 
> 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? 
> deploy.xml 
> ---------------- 
> (snippets)..... 
> <target name="deploy_sites"> 
>   <script language="perl"> 
>         @sites=qw/site1 site2 site3/; 
>         foreach $site (@sites) { 
>                 <antcall target="deploy"> 
>                         <param name="site" value="$site"/> 
>                 </antcall> 
>         } 
>   </script> 
> </target> 
> <target name="deploy"> 
>         <!-- This target would copy,ftp,etc the files to the site 
> machine 
> --> 
> </target> 
> <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. 
> -Anthony 
> 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. 

Terrorist Attacks on U.S. - How can you help? 
Donate cash, emergency relief information

View raw message