Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 93929 invoked from network); 19 Aug 2008 14:48:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Aug 2008 14:48:54 -0000 Received: (qmail 42854 invoked by uid 500); 19 Aug 2008 14:48:49 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 42827 invoked by uid 500); 19 Aug 2008 14:48: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 42816 invoked by uid 99); 19 Aug 2008 14:48:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 07:48:49 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 14:47:51 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KVSVQ-0004rq-Bq for user@ant.apache.org; Tue, 19 Aug 2008 07:48:20 -0700 Message-ID: <19051702.post@talk.nabble.com> Date: Tue, 19 Aug 2008 07:48:20 -0700 (PDT) From: cowwoc To: user@ant.apache.org Subject: Re: Initializing Task variables at taskdef time? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cowwoc@bbs.darktech.org References: <19048295.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I think that when I originally posted the question I misunderstood how custom tasks work. I didn't realize they were re-instantiated multiple times per build file. I wanted to add a "forked" attribute to my task (or to any task really) to enable it to either run inside the same JVM or inside a new JVM. I'm no longer sure that is worth the headache though so I guess for now I will simply leave this attribute out. Gili evgeny.zislis@gmail.com wrote: > > You can use something like a "presetdef" to set default values for your > task, and then use the presetdef when calling the task instead of the > original one. Is this what you want? > > On Tue, Aug 19, 2008 at 3:56 PM, cowwoc wrote: > >> >> Hi, >> >> This seems like such an obvious use-case but from what I read in this >> forum >> there doesn't seem to be a way to do it... is there a way for me to pass >> parameters to my custom task at taskdef (initialization time)? >> >> One obvious use-case is grabbing the classpath used in the taskdef during >> the task execution time, but this could pretty much apply to any variable >> I >> want to initialize *once* and reuse anytime the task is invoked. Is this >> possible in Ant 1.7? >> >> Thank you, >> Gili >> -- >> View this message in context: >> http://www.nabble.com/Initializing-Task-variables-at-taskdef-time--tp19048295p19048295.html >> Sent from the Ant - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> > > -- View this message in context: http://www.nabble.com/Initializing-Task-variables-at-taskdef-time--tp19048295p19051702.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org