Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A6E5973F for ; Sun, 5 Feb 2012 07:31:45 +0000 (UTC) Received: (qmail 70541 invoked by uid 500); 5 Feb 2012 07:31:45 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 70459 invoked by uid 500); 5 Feb 2012 07:31:37 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 70452 invoked by uid 99); 5 Feb 2012 07:31:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 07:31:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 07:31:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0BB0B23888E7 for ; Sun, 5 Feb 2012 07:30:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1240669 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/ComponentHelper.java src/tests/antunit/core/createtask-test.xml Date: Sun, 05 Feb 2012 07:30:49 -0000 To: notifications@ant.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120205073050.0BB0B23888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Sun Feb 5 07:30:49 2012 New Revision: 1240669 URL: http://svn.apache.org/viewvc?rev=1240669&view=rev Log: make sure Project#createTask has read defaults.properties. PR 50788 Added: ant/core/trunk/src/tests/antunit/core/createtask-test.xml (with props) Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1240669&r1=1240668&r2=1240669&view=diff ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Sun Feb 5 07:30:49 2012 @@ -123,7 +123,11 @@ Fixed bugs: fields rather than UTF-8 filenames and the EFS-Flag. * Access to DirectoryScanner's default excludes wasn't synchronized. - BigZilla Report 52188. + Bugzilla Report 52188. + + * When a Project instance was created by a custom tasks its + createTask method didn't work. + Bugzilla Report 50788. Other changes: -------------- Modified: ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java?rev=1240669&r1=1240668&r2=1240669&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/ComponentHelper.java Sun Feb 5 07:30:49 2012 @@ -855,6 +855,14 @@ public class ComponentHelper { return; // Already processed } checkedNamespaces.add(uri); + + if (antTypeTable.size() == 0) { + // Project instance doesn't know the tasks and types + // defined in defaults.properties, likely created by the + // user - without those definitions it cannot parse antlib + // files as taskdef, typedef and friends are unknown + initDefaultDefinitions(); + } Typedef definer = new Typedef(); definer.setProject(project); definer.init(); Added: ant/core/trunk/src/tests/antunit/core/createtask-test.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/createtask-test.xml?rev=1240669&view=auto ============================================================================== --- ant/core/trunk/src/tests/antunit/core/createtask-test.xml (added) +++ ant/core/trunk/src/tests/antunit/core/createtask-test.xml Sun Feb 5 07:30:49 2012 @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + Propchange: ant/core/trunk/src/tests/antunit/core/createtask-test.xml ------------------------------------------------------------------------------ svn:eol-style = native