From 0e1abe82d1942310786839697ac61424808f62ea Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Thu, 18 Nov 2004 09:48:59 +0000 Subject: [PATCH] Set the location for the default target (the location will be the project tag) PR: 32267 Reported by: Yves Martin git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277048 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ src/main/org/apache/tools/ant/helper/ProjectHelper2.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/WHATSNEW b/WHATSNEW index 9a2c56b50..71f4205a4 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -157,6 +157,9 @@ Fixed bugs: * Properties.propertyNames() should be used instead of .keys(). Bugzilla report 27261. +* Target location is not set for default target. + Bugzilla report 32267. + Changes from Ant 1.6.1 to Ant 1.6.2 =================================== diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java index fa96d369c..c0c79fafe 100644 --- a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java +++ b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java @@ -601,6 +601,9 @@ public class ProjectHelper2 extends ProjectHelper { boolean nameAttributeSet = false; Project project = context.getProject(); + // Set the location of the implicit target associated with the project tag + context.getImplicitTarget().setLocation( + new Location(context.getLocator())); /** XXX I really don't like this - the XML processor is still * too 'involved' in the processing. A better solution (IMO)