Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 17407 invoked by uid 500); 20 Sep 2001 22:40:25 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 17397 invoked from network); 20 Sep 2001 22:40:25 -0000 Message-ID: <7D380B2F4B3BD411B748009027855234019E1024@laxchange.weddingchannel.com> From: Anthony Rodriguez To: "'ant-user@jakarta.apache.org'" Cc: "'holtdl@yahoo.com'" Subject: RE: using ant in the deploy process Date: Thu, 20 Sep 2001 15:39:59 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C14225.2DEC7960" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C14225.2DEC7960 Content-Type: text/plain; charset="iso-8859-1" Thank you for your response Diane. I actually perused thru the mailings and found a couple of replies you sent about the ForEach.java task. I don't know if it can do what I want however. In a nutshell, I want to ftp, copy, etc a folder full of java and asp files to several servers. The servers will change from build to build. The number of servers could also vary from one to many. I was looking into the script task and I have a rudimentary knowledge of Javascript (I know how to make pop up windows from a web page :~). Would you happen to know if I can accomplish this sort of thing with the script task? Here's some pseudo code as to what I would like to do: deploy.xml ----------- ... .... Then from the command line I can call "ant main -buildfile deploy.xml". Am I even close with the pseudocode? -Anthony -----Original Message----- From: Diane Holt [mailto:holtdl@yahoo.com] Sent: Thursday, September 20, 2001 3:24 PM To: ant-user@jakarta.apache.org Subject: RE: using ant in the deploy process --- Anthony Rodriguez wrote: > I would like to pass the servers to deploy to at the command line. In what way do you plan to pass more than one in on the command line? Do you have a (potential) property for each server? > I could write a task for each and every server that can get deployed to Do you mean target? > 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? I can give it to you -- but since it's not Official Ant, maybe there's a way to avoid having to use it. > 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? I've only used it with javascript, but I seem to remember there being something weird about the perl stuff with it (just don't remember now exactly what the weirdness was). Diane ===== (holtdl@yahoo.com) __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ ------_=_NextPart_001_01C14225.2DEC7960 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: using ant in the deploy process

Thank you for your response Diane.  I actually = perused thru the mailings and found a couple of replies you sent about = the ForEach.java task.  I don't know if it can do what I want = however.

In a nutshell, I want to ftp, copy, etc a folder full = of java and asp files to several servers.  The servers will change = from build to build.  The number of servers could also vary from = one to many.  I was looking into the script task and I have a = rudimentary knowledge of Javascript (I know how to make pop up windows = from a web page :~).  Would you happen to know if I can accomplish = this sort of thing with the script task?  Here's some pseudo code = as to what I would like to do:

deploy.xml
-----------
...
<target name=3D"deploy_sites"> =
  <script = language=3D"javascript">
        New array = sites=3D"site1 site2 site3";  #the elements will come = from a properties file
        for(int = i=3D0;i<length.(sites);i++) {
       
          &nb= sp;     <antcall target=3D"deploy"> =
          &nb= sp;           &nb= sp; <param name=3D"site" value=3D"site[i]"/> =
          &nb= sp;     = </antcall>         =

        }
  </script>
</target>

<target name=3D"deploy">
        <exec = executable=3D"xcopy.exe">
        =         <arg = line=3D"/S /E ${cabinet} ${site}"/>
          = </exec>
</target>

<target name=3D"main" = depends=3D"deploy_sites">
....

Then from the command line I can call "ant main = -buildfile deploy.xml".

Am I even close with the pseudocode?

-Anthony

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Thursday, September 20, 2001 3:24 PM
To: ant-user@jakarta.apache.org
Subject: RE: using ant in the deploy process


--- Anthony Rodriguez = <Anthony@WeddingChannel.com> wrote:
> I would like to pass the servers to deploy to = at the command line.

In what way do you plan to pass more than one in on = the command line? Do
you have a (potential) property for each = server?

> I could write a task for each and every server = that can get deployed to

Do you mean target?

> 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?

I can give it to you -- but since it's not Official = Ant, maybe there's a
way to avoid having to use it.

> 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?

I've only used it with javascript, but I seem to = remember there being
something weird about the perl stuff with it (just = don't remember now
exactly what the weirdness was).

Diane

=3D=3D=3D=3D=3D
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information= /

------_=_NextPart_001_01C14225.2DEC7960--