Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 16429 invoked from network); 17 Sep 2000 21:54:40 -0000 Received: from natmail2.webmailer.de (HELO post.webmailer.de) (192.67.198.65) by locus.apache.org with SMTP; 17 Sep 2000 21:54:40 -0000 Received: from ns2000 (pec-13-59.tnt2.hh2.uunet.de [149.225.13.59]) by post.webmailer.de (8.9.3/8.8.7) with SMTP id XAA05613 for ; Sun, 17 Sep 2000 23:54:39 +0200 (MET DST) Message-ID: <005501c020f2$115a29f0$3b0de195@ns2000> From: "Nico Seessle" To: Subject: Fw: Using "if" in a target? Date: Sun, 17 Sep 2000 23:55:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Diane Holt" To: Sent: Sunday, September 17, 2000 11:35 PM Subject: Re: Using "if" in a target? > So "if" just checks to see if a property exists, not whether it's actually > set to anything? And the fact that I pass a define for the p4client > property, even though there's no value for it, makes that property "exist" > for ant? So, is there no way to test whether a property actually has a > value? > Should this be "fixed" in some way? The following could be done 1. If -Dname= is passed to ant assume that the user don't want to set this property (may break build-files) 2. Require the property specified for if=""/unless="" to contain one of the "boolean-values" "yes", "on" or "true" (this will break build-files, at least mine :-) ) 3. Require the property specified for if=""/unless="" to contain anything other than nothing (the empty string) (for if) and dont't just check for non-existence Or check for containing nothing or being non-existent (for unless). (should not break so much; not mine and not ant's build-file). If you use the available-task which seems the most common way to me the property is set to "true" if you don't specify somethng else so this should not be a problem. Nico