Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A0F09DAA for ; Tue, 14 Feb 2012 13:46:07 +0000 (UTC) Received: (qmail 10927 invoked by uid 500); 14 Feb 2012 13:46:07 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 10848 invoked by uid 500); 14 Feb 2012 13:46:07 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 10839 invoked by uid 99); 14 Feb 2012 13:46:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 13:46:07 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2012 13:46:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id A9965289800B for ; Tue, 14 Feb 2012 14:45:39 +0100 (CET) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6Mu0F2a1KBpn for ; Tue, 14 Feb 2012 14:45:39 +0100 (CET) Received: by samaflost.de (Postfix, from userid 1000) id 0E8982898012; Tue, 14 Feb 2012 14:45:39 +0100 (CET) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: Regarding exec task References: <1328674236.91530.YahooMailNeo@web161204.mail.bf1.yahoo.com> <1329056945.86381.YahooMailNeo@web161205.mail.bf1.yahoo.com> <87r4xxzio4.fsf@v35516.1blu.de> <1329225156.74505.YahooMailNeo@web161201.mail.bf1.yahoo.com> Date: Tue, 14 Feb 2012 14:45:38 +0100 In-Reply-To: <1329225156.74505.YahooMailNeo@web161201.mail.bf1.yahoo.com> (Vimil Saju's message of "Tue, 14 Feb 2012 05:12:36 -0800 (PST)") Message-ID: <87lio5zfy5.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2012-02-14, Vimil Saju wrote: > Your help is very much appreciated. Would using a custom > CommandLauncher make it possible for all the built-in ant tasks that > support fork attribute to use it.=C2=A0 Right now Execute uses a static CommandLauncher instance which is initialize inside the static initializer ("class constructor"). CommandLauncher's responsibility is tro create the Process instances. We don't have a way to make Execute use a different CommandLauncher, but if there was (like using the ProcessHelper you describe) then it would be used by all Execute instances - or we could make it so. > I was thinking of an approach similar to how ant allows property > expansion to be customized. By just adding our own custom > PropertyHelper we can change how properties are expanded globally. If > we have something like that for processes too, it would be great. > I'd like to write a patch for this if possible, but I'd like to know > the best way to implement it, without breaking anything else. That's great. > My idea was to provide something like ProcessHelper class that can be > stored as a reference in the project. The Execute class then calls > this class to get an appropriate Process implementation. I'm not sure about the name ProcessHelper when CommandLauncher is already there, but I'm not good at names either. One thing you must keep in mind is Execute may not have access to a Project instance at all - it may know about one if setAntRun has been used, but using that is somewhat optional. Also some methods in Execute are static and don't provide a Project. There need to be usable defaults for this case. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org