Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 48238 invoked from network); 29 Apr 2003 22:28:56 -0000 Received: from mail16.messagelabs.com (64.124.170.131) by daedalus.apache.org with SMTP; 29 Apr 2003 22:28:56 -0000 X-VirusChecked: Checked X-Env-Sender: edunn@merc-int.com X-Msg-Ref: server-29.tower-16.messagelabs.com!1051655341!2679 Received: (qmail 22192 invoked from network); 29 Apr 2003 22:29:01 -0000 Received: from diquil.merc-int.com (HELO merc-int.com) (64.242.155.19) by server-29.tower-16.messagelabs.com with SMTP; 29 Apr 2003 22:29:01 -0000 Received: from sunexbh01.merc-int.com (sunexbh01.merc-int.com [64.242.153.21]) by merc-int.com (8.11.2/8.11.2) with ESMTP id h3TMT1c29697 for ; Tue, 29 Apr 2003 15:29:01 -0700 Received: by sunexbh01.merc-int.com with Internet Mail Service (5.5.2653.19) id ; Tue, 29 Apr 2003 15:29:01 -0700 Message-ID: From: Eric Dunn To: "'Ant Users List'" Subject: RE: Design help Date: Tue, 29 Apr 2003 15:30:33 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, If I use an environment variable, it is not a permanent fix right? When the machine is rebooted the environment setting will go away unless we persitenly put it somewhere, right? I cannot expect to modify the environment on a customer's machine through my ANT script. I will need to pass these arguements as command line parameters, thus in the batch file. Thanks again, Eric -----Original Message----- From: Sebastien Blanc [mailto:Sebastien.Blanc@alcatel.com] Sent: Tuesday, April 29, 2003 3:16 PM To: Ant Users List Subject: Re: Design help " I am trying ot figure out how to do this correctly. I want to edit a .bat file, looking for a specific java call and adding a command line arguement, and something its command line specified classpath." -> u may want to externalize the pb and use for instance an environment variable in the bat script where u were trying to modify this 'variable', thus reducing the pb to modifying this variable in the environment. Eric Dunn wrote: > Forgot to mention, I cannot modify the batch file. It is something like a web server startup file like > WebLogic or JBoss. > > Thanks, > Eric > > -----Original Message----- > From: Tharp, Joshua L, SOLGV [mailto:jltharp@att.com] > Sent: Tuesday, April 29, 2003 3:06 PM > To: Ant Users List > Subject: RE: Design help > > Have you considered having a "source" bat file and just include tokens > in it (i.e. @TOKEN@)? Then you run a replace or copy on the "source" bat > with a filter and those tokens will be replaced with the correct values. > Conversely, if the tokens have already been replaced, then you won't > find any @TOKEN@ strings in your bat file and nothing will happen. > > Josh > > -----Original Message----- > From: Eric Dunn [mailto:edunn@merc-int.com] > Sent: Tuesday, April 29, 2003 3:03 PM > To: 'user@ant.apache.org' > Subject: Design help > > Hi, > I am trying ot figure out how to do this correctly. I want to edit > a .bat file, looking for a specific > java call and adding a command line arguement, and something its command > line specified classpath. > > So I tried replaceregexp and I it works right, but if my customer runs > it twice it has no way to check if it > already made the change. > > So I installed "Antelope" with its "if\else" tasks but it seems to check > properties. I need a property that > dynamically is set by perhaps some custom task like > "FileContains(filename,searchstring" so that the if\else > task in antelope can use it an decide whether to run my replaceregexpr. > > Is this the right train of thought? Should I just write some monster > custom ant task to just read the file > myself, do java conditional logic, and insert if appropriate? I am > pretty close to doing that. > > Thanks, > Eric > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org