Re: how to do conditional processing in ant

2009-07-17 Thread David Weintraub
There are two general ways to do conditional processing. One is to use the "if" or "unless" parameters on the task themselves: <...> <...> <...> <...> The above would execute the "corr

Re: FW: how to do conditional processing in ant

2009-07-17 Thread Scot P. Floess
I'm confused... Why do you keep mentioning "conditional processing?" I don't see anything conditional about this at all... Sorry - just trying to understand :) On Fri, 17 Jul 2009, edumudi.viswan...@oracle.com wrote: Assume, below folder structure & I issue following command @ command p

RE: how to do conditional processing in ant

2009-07-17 Thread Scot P. Floess
Ah - so really dev, sit, prod and uat are located in disjoint directories? For example: /foo/dev, /bar/sit, /alpha/prod and /beta/uat If so, I suppose you could do something like this: Then do your copy using ${ROOT} However, based on what I see you specifically

Re: how to do conditional processing in ant

2009-07-17 Thread Michael George
Seems like should do that, no? --Mike edumudi.viswan...@oracle.com wrote: Assume, below folder structure & I issue following command @ command prompt: ant -Denvv=sit -Dssltype=1SSL eardirect Xyz folder contains (dev,prod,sit,uat) Dev folder contains (1ssl & 2ssl) 1ssl folder

FW: how to do conditional processing in ant

2009-07-17 Thread edumudi.viswan...@oracle.com
Assume, below folder structure & I issue following command @ command prompt: ant -Denvv=sit -Dssltype=1SSL eardirect Xyz folder contains (dev,prod,sit,uat) Dev folder contains (1ssl & 2ssl) 1ssl folder contains 1.txt 2.txt 2

RE: how to do conditional processing in ant

2009-07-17 Thread edumudi.viswan...@oracle.com
Assume, below folder structure & I issue following command @ command prompt: ant -Denvv=sit -Dssltype=1SSL eardirect Xyz folder contains (dev,prod,sit,uat) Dev folder contains (1ssl & 2ssl) 1ssl folder contains 1.txt 2.txt 2s

Re: write property as part of task definition

2009-07-17 Thread HamletDRC
The number of include elements is dynamic so I don't think this is going to work. I've resorted to writing a custom task. I wish there was a better way to do this. Michael George wrote: > > Another possibility is to create a template file foo.xml.in and use copy > with substitutions: >

RE: how to do conditional processing in ant

2009-07-17 Thread Scot P. Floess
Well it seems to me you are really trying to copy files as denoted by a property - is this correct? So, for example lets say you do this: ant -Denvv=production -Dssltype=1SSL eardirect or ant -Denvv=sit -Dssltype=1SSL eardirect Are you wanting then to copy like so: Or am I missing s

Re: write property as part of task definition

2009-07-17 Thread Michael George
HamletDRC wrote: Hi Glenn, Thanks for the answer! I do indeed need to include the tag in echoxml because without it there is no root tag and so the xml is malformed. import strips off a tag, so you could alternatively use that.

Re: write property as part of task definition

2009-07-17 Thread Michael George
Another possibility is to create a template file foo.xml.in and use copy with substitutions: --- foo.xml.in @file1@ @file2@ --- build.xml --- I'm not sure if this would accomplish what you want. --Mike glenn opdycke-hansen wrote: Then use to write

RE: how to do conditional processing in ant

2009-07-17 Thread edumudi.viswan...@oracle.com
Conditional copy of files from a directory XYZ/prod/1ssl to xyz/ directory. -Original Message- From: Scot P. Floess [mailto:sflo...@nc.rr.com] Sent: Friday, July 17, 2009 8:06 PM To: Ant Users List Subject: Re: how to do conditional processing in ant Do you need to conditionally copy f

Re: write property as part of task definition

2009-07-17 Thread glenn opdycke-hansen
Then use to write to write to the file. --glenn On Fri, Jul 17, 2009 at 09:38, HamletDRC wrote: > > Sorry, but this isn't going to work. > > Both echo and echoxml escapes the brackets in the property that contains > XML. > > > > > > HamletDRC wrote: > > > > Hi Glenn, > > > > Thanks for the answ

Re: write property as part of task definition

2009-07-17 Thread HamletDRC
Sorry, but this isn't going to work. Both echo and echoxml escapes the brackets in the property that contains XML. HamletDRC wrote: > > Hi Glenn, > > Thanks for the answer! > > I do indeed need to include the tag in echoxml because without it > there is no root tag and so the xml is

Re: how to do conditional processing in ant

2009-07-17 Thread Scot P. Floess
Do you need to conditionally copy files or copy files based on a dir defined in a property? On Fri, 17 Jul 2009, edumudi.viswan...@oracle.com wrote: Hi Friends, I know how to pass more than one command line arguments /parameters to a task in ant. Ex: Command prompt>ant -Denvv=produc

how to do conditional processing in ant

2009-07-17 Thread edumudi.viswan...@oracle.com
Hi Friends,   I know how to pass more than one command line arguments /parameters to a task in ant.   Ex:   Command prompt>ant –Denvv=production  -Dssltype=1SSL  eardirect    ( where eardirect is a task name I defined in ant)   Assume I have four different environments like PRO

Re: write property as part of task definition

2009-07-17 Thread HamletDRC
Hi Glenn, Thanks for the answer! I do indeed need to include the tag in echoxml because without it there is no root tag and so the xml is malformed. glenn opdycke-hansen wrote: > > I would try the following approach: (1) write the value to a file and (2) > import the file back to the An

Re: for task inside path task

2009-07-17 Thread kleinfisch
correct!! David Weintraub wrote: > > Just to understand what you're trying to do: > > You have various references to paths. There could be one or more of > these references. What you want is a combined path of all of these > references. Is that correct? > > On Thu, Jul 9, 2009 at 3:44 AM, kle