Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 49825 invoked from network); 27 Sep 2010 00:28:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 00:28:47 -0000 Received: (qmail 37803 invoked by uid 500); 27 Sep 2010 00:28:46 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 37739 invoked by uid 500); 27 Sep 2010 00:28:46 -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 37731 invoked by uid 99); 27 Sep 2010 00:28:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 00:28:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of qazwart@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qy0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 00:28:39 +0000 Received: by qyk9 with SMTP id 9so4579186qyk.4 for ; Sun, 26 Sep 2010 17:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Ar26Kzj2jMOdhzbuP9UtYrmrlvF/32X8ZakUnAQkh78=; b=vwDd18JS48nnTqL0o8+Js1+QmIBjI6zXYjC0fCPkkmL8JThAZ2hEtnspkGwx1nN3Cv 9lSApBma9VvqtLjvCjaxSdPaSoIWFU1sxetrX8jujN6cYE5dmOjhKc7h1sJh6bnWKF+5 6F5SeB33yUrU0fI++aSxg9kxMv27JahTxsVrM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dfAFV0gMxUtmkGM8N5mWZzQYgzdpL98QK7Jz8m7+FxtjsYcPO77tcUZGnPf8ULNER4 W5Lo+Ih5H7yU2awVNlKeDIJ0TjtEpxtKAuTG6vLqKNjc+5buAxMUbRkTqM4iGMm5P/Ii RokJOWjGYGJ8YnMQOVRCItbf4odCi9Km3Gl9k= MIME-Version: 1.0 Received: by 10.224.19.200 with SMTP id c8mr4902653qab.129.1285547297669; Sun, 26 Sep 2010 17:28:17 -0700 (PDT) Received: by 10.229.231.82 with HTTP; Sun, 26 Sep 2010 17:28:17 -0700 (PDT) In-Reply-To: <535909.38743.qm@web55101.mail.re4.yahoo.com> References: <535909.38743.qm@web55101.mail.re4.yahoo.com> Date: Sun, 26 Sep 2010 20:28:17 -0400 Message-ID: Subject: Re: conditional global variables? From: David Weintraub To: Ant Users List Content-Type: text/plain; charset=ISO-8859-1 There are several ways this can be done: One is to use multiple tasks: In the example you gave, you could simply set the property "type" to either "dev" or "release": You can also use separate XML property files: Or, you can use the antcontrib library which includes a conditional "if" statement. If you do this, I would put the ant-contrib.jar file in a directory called "antlib" in the root of your project and use the following : This way, ant will work without having to specifically install the ant-contrib.jar file. You can find Ant-Contrib at: http://ant-contrib.sourceforge.net The task looks like this: -- David Weintraub qazwart@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org