Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 10219 invoked from network); 17 Jul 2009 15:45:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jul 2009 15:45:54 -0000 Received: (qmail 11120 invoked by uid 500); 17 Jul 2009 15:46:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 11036 invoked by uid 500); 17 Jul 2009 15:46:59 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 11026 invoked by uid 99); 17 Jul 2009 15:46:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 15:46:59 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [148.87.113.124] (HELO rgminet12.oracle.com) (148.87.113.124) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 15:46:47 +0000 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6HFjvgC003658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Jul 2009 15:46:01 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6HCG55Q029396 for ; Fri, 17 Jul 2009 15:48:21 GMT Received: from 202.46.219.88 by acsmt354.oracle.com with ESMTP id 18451476001247845578; Fri, 17 Jul 2009 08:46:18 -0700 From: "edumudi.viswanath@oracle.com" To: "Ant Users List" Subject: RE: how to do conditional processing in ant Date: Fri, 17 Jul 2009 21:17:05 +0530 Thread-Index: AcoG9dEMwntiMnJ5S8yNk36dDRBTVw== Message-ID: <20090717211705555.00000000324@IFLEXPAH169> In-Reply-To: References: <20090717194603439.00000000324@IFLEXPAH169> <20090717203142882.00000000324@IFLEXPAH169> X-Mailer: Oracle Connector for Outlook 10.1.3.0.10 100801 (12.0.6300) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010204.4A609CCC.001A:SCFMA4539814,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org Assume, below folder structure & I issue following command @ command promp= t: ant -Denvv=3Dsit -Dssltype=3D1SSL eardirect Xyz folder contains (dev,prod,sit,uat) Dev folder contains (1ssl & 2ssl) 1ssl folder contains = 1.txt 2.txt = 2ssl = = 1.txt 2.txt Sit folder contains 1ssl folder contains = 1.txt 2.txt = 2ssl = = 1.txt 2.txt Prod folder contains 1ssl folder contains = 1.txt 2.txt = 2ssl = = 1.txt 2.txt Uat folder contains 1ssl folder contains = 1.txt 2.txt = 2ssl = = 1.txt 2.txt Now, based on given envv & ssltype, it should copy files from xyz/sit/1ssl = to xyz/. To do this copy task, ant must use some kind of conditional processing. Bas= ed on that decision, It needs to copy files from that particular folder to = xyz folder. = -----Original Message----- From: Scot P. Floess [mailto:sfloess@nc.rr.com] = Sent: Friday, July 17, 2009 8:39 PM To: Ant Users List Subject: RE: how to do conditional processing in ant 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=3Dproduction -Dssltype=3D1SSL eardirect or ant -Denvv=3Dsit -Dssltype=3D1SSL eardirect Are you wanting then to copy like so: Or am I missing something? On Fri, 17 Jul 2009, edumudi.viswanath@oracle.com wrote: > Conditional copy of files from a directory XYZ/prod/1ssl to xyz/ directo= ry. > > -----Original Message----- > From: Scot P. Floess [mailto:sfloess@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 files or copy files based on a dir > defined in a property? > > > > On Fri, 17 Jul 2009, edumudi.viswanath@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=3Dproduction -Dssltype=3D1SSL eardirec= t ( where eardirect is a task name I defined in ant) >> >> >> >> Assume I have four different environments like PROD, SIT, UAT & DEV and = I can access each environment in 2 different ways like 1 way SSL & 2 way SS= L. So user may give envv from PROD/SIT/UAT/DEV and ssltype from 1SSL/2SSL= .= >> >> >> >> Now my requirement is " based on user parameters like envv=3Dproduction = & ssltype=3D1SSL, I need to copy some files from xyz/1ssl/ folder to xyz= / folder" here I should use some conditional logic. Is there any coretask = available in ANT to do this ? >> >> >> >> Please help regarding the same. >> >> >> >> Thanks in advance. >> >> >> >> Regards, >> >> Oracle logo.gif >> >> Edumudi Venkata Viswanath | Associate Consultant | | +91 20 3984 7491 (O= ) | 9665045854 (M) >> Oracle Financial Services Software Limited | Ambrosia, Pune, India >> >> >> >> Oracle Financial Services Software Limited was formally i-flex solutions= limited. >> >> >> >> > > Scot P. Floess > 27 Lake Royale > Louisburg, NC 27549 > > 252-478-8087 (Home) > 919-890-8117 (Work) > > Chief Architect JPlate http://sourceforge.net/projects/jplate > Chief Architect JavaPIM http://sourceforge.net/projects/javapim > > Architect Keros http://sourceforge.net/projects/keros > > --------------------------------------------------------------------- > 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 > > Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-890-8117 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- 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