Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 97864 invoked from network); 17 Sep 2000 20:52:24 -0000 Received: from web109.yahoomail.com (205.180.60.76) by locus.apache.org with SMTP; 17 Sep 2000 20:52:24 -0000 Received: (qmail 616 invoked by uid 60001); 17 Sep 2000 20:52:18 -0000 Message-ID: <20000917205218.615.qmail@web109.yahoomail.com> Received: from [64.163.67.114] by web109.yahoomail.com; Sun, 17 Sep 2000 13:52:18 PDT Date: Sun, 17 Sep 2000 13:52:18 -0700 (PDT) From: Diane Holt Subject: Using "if" in a target? To: ant-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Am I using "if" correctly in this target: I have another target that depends on nsync, which I assumed would mean "If nsync doesn't get run (or if it runs but fails), don't run this one" -- and I assumed if the property in the "if" in nsync wasn't set, then nsync wouldn't get run. The target that depends on nsync is just a little stubbed-off echo (for now): I explicitly unset the env var that the p4client property is passed in the ant wrapper-script (ie., "$JAVACMD ... -Dp4client=$P4CLIENT ...") so that the property wouldn't have a value. The output from the check_properties target shows that p4client isn't set, as does the fact and type of the error from the command that nsync went ahead and executed anyway: [binky] ant check_properties build Buildfile: build.xml check_properties: p4client is: nsync: [exec] Client 'binky' unknown - use 'client' command to create it. [exec] Result: 1 build: Running build target... BUILD SUCCESSFUL Total time: 2 seconds Note that not only did nsync get run, even though the p4client property isn't set, the in the nsync target resulted in 1, and still the build target got run. So am I just doing this all wrong -- or is ant not behaving as it should? (I'm hoping it's the former -- then I can just correct whatever it is I'm doing, and get past this.) I'm running the nightly from 9/16. (But it behaves the same with the nightly back from 9/9.) Thanks, Diane ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/