Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 40726 invoked from network); 2 Jun 2004 05:28:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Jun 2004 05:28:38 -0000 Received: (qmail 86888 invoked by uid 500); 2 Jun 2004 05:28:43 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 86689 invoked by uid 500); 2 Jun 2004 05:28:42 -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 86629 invoked by uid 99); 2 Jun 2004 05:28:41 -0000 Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 01 Jun 2004 22:28:41 -0700 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.10/8.12.10) with ESMTP id i525RxZY028231 for ; Wed, 2 Jun 2004 07:27:59 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2657.72) id ; Wed, 2 Jun 2004 07:26:31 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B560E23F1C9@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: RE: CheckSum Task and Properties? Date: Wed, 2 Jun 2004 07:27:59 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C44862.5DE01D20" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C44862.5DE01D20 Content-Type: text/plain; charset="iso-8859-1" BTW if you want to work the changed file (e.g. copy it...) the have a look at the modified selector [1]. Jan [1] http://ant.apache.org/manual/CoreTypes/selectors.html#modified > -----Original Message----- > From: Mani G. Iyer [mailto:iyer@rcn.com] > Sent: Wednesday, June 02, 2004 4:38 AM > To: 'Ant Users List' > Subject: RE: CheckSum Task and Properties? > > > > Yanrong: > > The problem is that the condition expects the value of the > property not the property itself. So you will have to code something > like: > but unfortunately this is not > allowed in Ant, althought you can use the from > Ant-contrib to accomplish what you want. My question to you is why do > you need to have properties as ${f}.verified or ${f}.changed when > something like file.verified or file.changed would do. So you could > code something like: > > > > > > > Verification 02 > > if="file.verified"> > Verification Succeeded > > > HTH. > Mani G. Iyer > > -----Original Message----- > From: Yanrong Deng [mailto:Y-Deng@wiu.edu] > Sent: Tuesday, June 01, 2004 9:01 PM > To: user@ant.apache.org > Subject: CheckSum Task and Properties? > > Mr. Mani G. Iyer helped Ms. Deng when we were using > properties with > the checksum command to see if a value changed. That is > working for > us. Thanks! > > However, I want to do the same thing where the file name is passed > to one ant file using the "ant" task. We are experiencing > the same dificulty. > > The file ctM.xml invokes the ErrorMessageIfXChanged task of > ctdemo.xml > However, the file name is passed as the property "f". > > That is not working properly for us. The "x" file has not > changed but ant is not displaying "Verification Succeeded." > > __________________________________________________________ > Here is our main ant task (ctM.xml) > > > > > > > > > > > > > > > > Here is the ctdemo.xml ant task which ctM invoked: > > > > > > Verification 01 > > > > > > > Verification 02 > > if="${f}.verified"> > Verification Succeeded > > > > > Here is the shell file we run > > ant -debug -buildfile ctM.xml Verify > > > Here is its output (I abbreviated a few of the lines that are > not relevant to this problem.) > > > > Apache Ant version 1.6.0 compiled on December 18 2003 > Buildfile: ctM.xml > Adding reference: ant.PropertyHelper > Detected Java version: 1.4 in: /usr/java/j2sdk1.4.1_01/jre > Detected OS: Linux > Adding reference: ant.ComponentHelper > Setting ro project property: ant.version -> Apache Ant version 1.6.0 > compiled > on December 18 2003 > Setting ro project property: ant.file -> > /home/leffstudent/Project/ctM.xml > Adding reference: ant.projectHelper > Adding reference: ant.parsing.context > Adding reference: ant.targets > parsing buildfile /home/leffstudent/Project/ctM.xml with URI = > file:///home/leffstudent/Project/ctM.xml > Setting ro project property: ant.file.null -> > /home/leffstudent/Project/ctM.xml > Project base dir set to: /home/leffstudent/Project > +Target: > +Target: all > +Target: Verify > Build sequence for target `Verify' is [Verify] > Complete build sequence is [Verify, all, ] > > Verify: > Adding reference: ant.ComponentHelper > *** setting internal property variables here *** > Project base dir set to: /home/leffstudent/Project > Setting ro project property: f -> x > [ant] calling target ErrorMessageIfXChanged in build > file /home/leffstudent/Project/ctdemo.xml > Setting ro project property: ant.file -> > /home/leffstudent/Project/ctdemo.xml > Adding reference: ant.projectHelper > Adding reference: ant.parsing.context > Adding reference: ant.targets > parsing buildfile /home/leffstudent/Project/ctdemo.xml with URI = > file:///home/leffstudent/Project/ctdemo.xml > Setting ro project property: ant.file.null - > > /home/leffstudent/Project/ctdemo.xml > Project base dir set to: /home/leffstudent/Project > +Target: > +Target: GenerateCheckSum > +Target: SeeIfXChanged > +Target: ErrorMessageIfXChanged > [ant] Entering /home/leffstudent/Project/ctdemo.xml... > Build sequence for target `ErrorMessageIfXChanged' is [SeeIfXChanged, > ErrorMessageIfXChanged] > Complete build sequence is [SeeIfXChanged, ErrorMessageIfXChanged, > GenerateCheckSum, ] > > SeeIfXChanged: > Setting project property: x.changed -> true > Condition false; not setting x.verified > [echo] Verification 02 > > ErrorMessageIfXChanged: > Skipped because property 'x.verified' not set. > [ant] Exiting /home/leffstudent/Project/ctdemo.xml. > > BUILD SUCCESSFUL > Total time: 1 second > > > --------------------------------------------------------------------- > 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 > ------_=_NextPart_001_01C44862.5DE01D20--