Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 8732 invoked from network); 15 Feb 2002 03:07:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 15 Feb 2002 03:07:35 -0000 Received: (qmail 16144 invoked by uid 97); 15 Feb 2002 03:07:34 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 16128 invoked by uid 97); 15 Feb 2002 03:07:34 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 16117 invoked from network); 15 Feb 2002 03:07:33 -0000 Sender: mjm@enteract.com Message-ID: <3C6C7AF3.9AACA910@rcnchicago.com> Date: Thu, 14 Feb 2002 21:05:23 -0600 From: Michael J McGonagle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3-20mdk i586) X-Accept-Language: en MIME-Version: 1.0 To: Ant Users List Subject: Re: Using the 'Uptodate' task References: <20020214235930.3990.qmail@web13401.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Diane Holt wrote: Thanks Diane, I think my problem is that I am thinking of these as "variables" and not properties. It is all in how the task interprets the values of what is passed to them, it does not assume they are all "variables" and try to evaluate them. Mike > > --- Michael J McGonagle wrote: > > The problem turned out that I was using 'unless="${file3.isBuilt}"' when > > it should have been 'unless="file3.isBuilt"'. > > > > Is it just a matter of the difference between testing for the > > 'exsistance of' and getting the 'value of'? > > Nope -- 'if' and 'unless' don't test the value of a property, only whether > it's set/not-set. > > > If this is the case, I can see why things were happening the way they > > were with my original code. Both times it was getting a 'true' when it > > tested for the property. On the one hand, it was true because the > > variable was not set, and in the second, it is true because its VALUE > > was true, and I was asking for its value and not its exsistance. > > Nope -- you were saying "unless a property named '${file3.isBuilt}' is > set, run this target". And since a property with that (literal) name > wasn't set, your target ran. To see this try: > > > > > > > > > > $ ant doUnless doIf > doUnless: > [echo] Property ${foo} is not set. > > Now uncomment the and run it again. Of course, you'd never > actually want to set a property that was named '${foo}', since you'd never > be able to get at its value. (Maybe we should add some error-checking to > prevent people from doing that very thing :) > > Diane > > ===== > (holtdl@yahoo.com) > > __________________________________________________ > Do You Yahoo!? > Send FREE Valentine eCards with Yahoo! Greetings! > http://greetings.yahoo.com > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: