Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCA577805 for ; Sun, 30 Oct 2011 03:51:09 +0000 (UTC) Received: (qmail 53764 invoked by uid 500); 30 Oct 2011 03:51:09 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 53640 invoked by uid 500); 30 Oct 2011 03:51:08 -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 53628 invoked by uid 99); 30 Oct 2011 03:51:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 03:51:06 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rhino1@sympatico.ca designates 65.55.111.163 as permitted sender) Received: from [65.55.111.163] (HELO blu0-omc4-s24.blu0.hotmail.com) (65.55.111.163) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 03:50:56 +0000 Received: from BLU0-SMTP77 ([65.55.111.137]) by blu0-omc4-s24.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 29 Oct 2011 20:50:35 -0700 X-Originating-IP: [184.147.201.60] X-Originating-Email: [rhino1@sympatico.ca] Message-ID: Received: from [127.0.0.1] ([184.147.201.60]) by BLU0-SMTP77.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 29 Oct 2011 20:50:33 -0700 Date: Sat, 29 Oct 2011 23:54:54 -0400 From: Rhino User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Ant Users List Subject: Re: Target Execution Sequence References: <1319940704.59735.YahooMailNeo@web161206.mail.bf1.yahoo.com> In-Reply-To: <1319940704.59735.YahooMailNeo@web161206.mail.bf1.yahoo.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 111029-0, 2011-10-29), Outbound message X-Antivirus-Status: Clean X-OriginalArrivalTime: 30 Oct 2011 03:50:34.0026 (UTC) FILETIME=[13AE18A0:01CC96B7] X-Virus-Checked: Checked by ClamAV on apache.org I was afraid you were going to say that. It'll take a while to obfuscate the parts that I don't want to make public. I'll send it along tomorrow. -- Rhino On 2011-10-29 22:11, Vimil Saju wrote: > It would be helpful if you could attach the build file along with the mail. > > > ________________________________ > From: Rhino > To: ant-user > Sent: Saturday, October 29, 2011 5:47 PM > Subject: Target Execution Sequence > > > I'm having a perplexing problem and I'm hoping someone here can help me understand whatever I'm missing. I was moderately fluent with Ant at one point but I've been away from it a while and have probably just forgotten some fundamental that I need to know. > > Here's the deal. I have an Ant script that is displaying an AntForm. The AntForm contains some checkboxes that are supposed to make me keep or omit three particular paragraphs in a document I am writing later in the script. Basically, I use the AntForm to set specific booleans, one for each of the three paragraphs, in a Java source file to true or false. Then, I generate the document with a program that I've written and that program either writes the specified paragraphs or omits them based on the values of the booleans. At least, that's what's SUPPOSED to happen. > > In reality, the booleans are being seen by the program that generates the document as true regardless of what has been done with the AntForm. Therefore, all three special paragraphs always appear in the document even when I've asked for some or all of them to be omitted. > > This baffles me because I actually display the contents of the Java source file to myself in the Ant script before and after the execution of the program that generates the document and the values of the three booleans and they have the correct values. For instance, I can set the three booleans to false, true and false respectively via the AntForm and that's exactly how they appear in the Java source file just before I generate the document. (Then I reset the values to their defaults (all three true) then display them to myself and they are all true.) However, when I write the values of the booleans within the program that is generating the document, they are invariably all true, even if they have been set to different values. > > I don't understand why I'm getting this misbehaviour. > > My working theory is that Ant is NOT executing the tasks within the script in the expected order. When I add the -verbose and -debug parameters to the Ant Build, I see something that the task that displays the AntForm is done in its proper sequence, namely first within the script. However, the tasks that are to be executed to change the values of the booleans are NOT executed immediately after the AntForm is displayed but after the compile of the Java code. The script is displaying the AntForm and letting me check the checkboxes as I like, then compiling the code and ONLY THEN actually editing the source file to set some of the booleans to false. I think this explains why the switches are always seen as true by the document-generating program: the generator is simply not getting the edited version of the source file. > > Can anyone confirm that my theory makes sense? Or, if it doesn't, suggest a better explanation? If I'm on the right track, what is it that I'm not understanding about the execution sequences of tasks within targets? I had assumed that each task within a target would be executed before tasks in other targets were started.... > > -- > Rhino > > --------------------------------------------------------------------- > 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