Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 63982 invoked from network); 28 Feb 2005 18:14:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Feb 2005 18:14:04 -0000 Received: (qmail 96462 invoked by uid 500); 28 Feb 2005 18:13:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 96422 invoked by uid 500); 28 Feb 2005 18:13:59 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 96407 invoked by uid 99); 28 Feb 2005 18:13:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from chiron.lunarpages.com (HELO chiron.lunarpages.com) (64.235.234.14) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 28 Feb 2005 10:13:58 -0800 Received: from zammet2 by chiron.lunarpages.com with local (Exim 4.44) id 1D5pP2-0003bz-5G for user@ant.apache.org; Mon, 28 Feb 2005 10:13:56 -0800 Received: from 12.27.179.239 ([12.27.179.239]) (SquirrelMail authenticated user fzlists@omnytex.com) by webmail.chiron.lunarpages.com with HTTP; Mon, 28 Feb 2005 13:13:56 -0500 (EST) Message-ID: <55438.12.27.179.239.1109614436.squirrel@webmail.chiron.lunarpages.com> In-Reply-To: <20050228180725.73162.qmail@web30906.mail.mud.yahoo.com> References: <4724.12.27.179.239.1109613418.squirrel@webmail.chiron.lunarpages.com> <20050228180725.73162.qmail@web30906.mail.mud.yahoo.com> Date: Mon, 28 Feb 2005 13:13:56 -0500 (EST) Subject: Re: Conditionals From: "Frank W. Zammetti" To: "Ant Users List" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chiron.lunarpages.com X-AntiAbuse: Original Domain - ant.apache.org X-AntiAbuse: Originator/Caller UID/GID - [32746 1232] / [47 12] X-AntiAbuse: Sender Address Domain - omnytex.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Regarding the Ant way... I could do what I want just by not defining a given property in my properties file, that would be acceptable. However, I encountered a problem doing that... The first task in my build bumps up a build number in the properties file. In doing so, it seems that any comments in the properties file are wiped out. I wouldn't want to do conditionals this way unles I could have a comment that says "uncomment this for build type A, comment it for type B". So, is there a way to get this task... To NOT wipe out my comments? Thanks again, I'm learning alot :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, February 28, 2005 1:07 pm, Matt Benson said: > > --- "Frank W. Zammetti" wrote: >> Is it possible, and if so how, to do conditionals? >> I'd like to have a way >> basically on each task to say "if property A=value1, >> then run this task, >> otherwise don't". I'm looking through the manual >> now but haven't come >> across what seems to fit the bill. > > As others have suggested, you can use ant-contrib's if > task. However, the "Ant way" to do this is described > in the manual: > http://ant.apache.org/manual/using.html#buildfile > > HTH, > Matt > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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