Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 11467 invoked from network); 8 Mar 2005 20:02:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Mar 2005 20:02:02 -0000 Received: (qmail 34586 invoked by uid 500); 8 Mar 2005 20:01:58 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 34263 invoked by uid 500); 8 Mar 2005 20:01:57 -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 34249 invoked by uid 99); 8 Mar 2005 20:01:57 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web50110.mail.yahoo.com (HELO web50110.mail.yahoo.com) (206.190.38.38) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 08 Mar 2005 12:01:55 -0800 Received: (qmail 86957 invoked by uid 60001); 8 Mar 2005 20:01:53 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=ZKRpqSGr3MGKh8tQkmpcpQTkefED/3ITCJpWJ94nJxuxVKR/jSVurNpIftpo1popeR83O6mvkbolzSKya1tuCgGgW/Yr6Pp8YZIcnyCkf8jD950c439UrbbgNnX+O5S1AnhOHHrRBLrT2g0bOe1EMQjVJOol8oOJ44laKoyNlJY= ; Message-ID: <20050308200153.86955.qmail@web50110.mail.yahoo.com> Received: from [24.45.130.147] by web50110.mail.yahoo.com via HTTP; Tue, 08 Mar 2005 12:01:53 PST Date: Tue, 8 Mar 2005 12:01:53 -0800 (PST) From: klute Subject: RE: logic using ant To: Ant Users List In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Rob and all, That's exactly what i was looking for. I think properties file is the way to go in my case. Best, James --- "Anderson, Rob (Global Trade)" wrote: > This is certainly possible. Depending on what > exactly you are trying to do, your method to acheive > it may differ. Here is one method I use to get the > same thing done in different environments. > > I create a properties file for each environment: > dev.properties > test.properties > > In the properties files, I put environment specific > stuff, like the following: > dev.properties > ############### > HOSTNAME=localhost > DEPLOYPATH=C:\some\path\to\deploy\stuff\ > DOSOMETHING=TRUE > > Then I would have a build.xml that looks like this: > > > property="prop.file.exists"/> > Can't find > ${env}.properties > > > > > > > > > > > > Then I call ant with the following command: > ant -Denv=dev build\ > > The dosomething target will always get called, but > will only execute if the DOSOMETHING property is > set. So I don't set this in test.properties, > perhaps. > > I hope this helps, > > -Rob Anderson > > > -----Original Message----- > > From: klute [mailto:soundres9@yahoo.com] > > Sent: Monday, March 07, 2005 2:32 PM > > To: user@ant.apache.org > > Subject: logic using ant > > > > > > hey guys > > > > i have a dev and test environments with the former > > being on win xp and the latter on linux. i am > trying > > to put some logic within my build target to do > things > > differently. i'd like to do this to avoid separate > > targets for dev and text environments. here is > some > > basic pseudo code of what i am trying to achieve: > > > > if some env variable indicates that the script is > > running in windows env { > > do this > > } else { > > do that > > } > > > > is this possible? > > > > thanks a lot! > > james > > > > > > > > > > __________________________________ > > Celebrate Yahoo!'s 10th Birthday! > > Yahoo! Netrospective: 100 Moments of the Web > > http://birthday.yahoo.com/netrospective/ > > > > > --------------------------------------------------------------------- > > 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 > > __________________________________________________ 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