Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 31941 invoked from network); 30 Aug 2007 15:20:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 15:20:58 -0000 Received: (qmail 87914 invoked by uid 500); 30 Aug 2007 15:20:49 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 87888 invoked by uid 500); 30 Aug 2007 15:20:49 -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 87877 invoked by uid 99); 30 Aug 2007 15:20:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 08:20:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ddevienne@gmail.com designates 64.233.182.190 as permitted sender) Received: from [64.233.182.190] (HELO nf-out-0910.google.com) (64.233.182.190) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 15:20:45 +0000 Received: by nf-out-0910.google.com with SMTP id k4so564357nfd for ; Thu, 30 Aug 2007 08:20:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XkGmFQBpzQAnCj+8WatGfH16ZXoVPWgYWYWEmiCjv4wLUnEuEe+wAZhbKbmsECyO8uyxJ6GrDveAlPVoU1QN3b4EP7H1SXDqDiR6gOdHxdY05jO/hSgm2oncWxiMQveRWiPVE3Xn6ezfiqgE3x4pAhBuI1WMD4s9eZGmedpC/qo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ADk3/aVKAD8Us7MeIaRSCC2HttJBWf5aoTZHan704L0ri2uw5JTaRJVUUTn9qofRhP6Avf5Rlt0RuONS6efsyXB2fH6Gwr0RyRIMfjpxyXUGcR9jjgvP/9iJbTaxMON4djng+4FUJQrUrMA+wgxNFfe65AIQP1racLienMs8xCU= Received: by 10.82.100.1 with SMTP id x1mr1330845bub.1188487223175; Thu, 30 Aug 2007 08:20:23 -0700 (PDT) Received: by 10.66.222.18 with HTTP; Thu, 30 Aug 2007 08:20:23 -0700 (PDT) Message-ID: <255d8d690708300820h6994f8acv3c563f2a39026cfa@mail.gmail.com> Date: Thu, 30 Aug 2007 10:20:23 -0500 From: "Dominique Devienne" To: "Ant Users List" Subject: Re: R: global variables In-Reply-To: <79D8F22AF67F59468C703C3723E51DAE02D26EB2@OFFICE-E> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <79D8F22AF67F59468C703C3723E51DAE02D26EB2@OFFICE-E> X-Virus-Checked: Checked by ClamAV on apache.org On 8/30/07, Pom=E8 Elisabetta wrote: > Thank you, but I'm not sure I have understood. > If I have 3 target (target A with an antcall to target B and an antcall t= o > another target C) and I define a property in target B I can't see its val= ue > in target C. So I thought that properties have the scope of the target in > which they're defined. Am I wrong? > But my problem is different 'cause I need to change a value due to some > condition in order to decide a behavior. I have a foreach loop: inside th= at > loop I have to set "something" (a property? I don't think, 'cause propert= ies > are immutable) when I found a certain condition. Each time I enter the lo= op > I need to test this "something" in order to understand whether continue o= r > end the loop. It sounds (antcall chain, foreach loops) like you are trying to use Ant as an imperative scripting language with method calls and variables. Ant is not designed for this, and although it has some support for these constructs, you are using it "against the grain", which leads to issues (because of property immutability). Ant "way" is declarative, where high level targets *depend* on lower level targets (as opposed to antcalling other targets), and loops are usually built in to tasks, not explicit. Rather that asking questions about using the scripting features of Ant, tell us what you are trying to achieve at a higher level and we may be able to point you to facilities in Ant that could achieve them. There are things that Ant can't do out-of-the-box, but then one switches to a real scripting language to achieve them (using