From ant-user-return-25566-qmlist-jakarta-archive-ant-user=jakarta.apache.org@jakarta.apache.org Mon Oct 07 07:01:41 2002 Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 37003 invoked from network); 7 Oct 2002 07:01:41 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 7 Oct 2002 07:01:41 -0000 Received: (qmail 9630 invoked by uid 97); 7 Oct 2002 06:54:32 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 9577 invoked by uid 97); 7 Oct 2002 06:54:31 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 9563 invoked by uid 98); 7 Oct 2002 06:54:30 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: ant-user@jakarta.apache.org Subject: Re: Bug in Ant? Custom tasks aren't executed (set methods are called though) only when "antcall" is used. References: From: Stefan Bodewig Date: 07 Oct 2002 08:53:20 +0200 In-Reply-To: Message-ID: Lines: 40 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Fri, 4 Oct 2002, Ryan Cuprak <507107@corpmail.kodak.com> wrote: >     > classname="com.kodak.sis.ant.RCG" > classpath="${g_ant_extensions}"/> >     unless this is a cut-n-paste error or typo, here is your problem. That should by , not . I think I know what's going on and can explain why it works when you invoke your target directly (this is the real bug, BTW) but not if you call it via . When Ant parses your build-file and reaches this one > it will try to look up a task named "RCGenericLog" and fail, then it will look for a data-type of that name and fail again. Then it will mark this thing as unknown and keep an instance of UnknownElement as a placeholder until this task is going to be executed. When your target gets run the "normal" (i.e. non-) way, the typedef has defined RCGenericLog as a data-type. UnknownElement will replace itself with an instace of the corresponding class and (and here is the bug) call execute() on the instance without checking whether it is a task or a data-type. Now consider the execution. The child build process inherits all task and data-type definitions of the parent build. When Ant now parses the build-file again (it does so in ) it will know the data-type "RCGenericLog". It will call the setters (and handle nested child elements if present), but it will not call execute() on it, as this is the only difference between handling data-types and tasks. Stefan -- To unsubscribe, e-mail: For additional commands, e-mail: