mbenson 2004/07/19 11:22:36 Modified: . Tag: ANT_16_BRANCH WHATSNEW src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH AntXMLContext.java ProjectHelper2.java Log: Merged changes to set Target Location, erroneously omitted from 1.6.2 . PR: 28599 Submitted by: Jesse Glick Revision Changes Path No revision No revision 1.503.2.122 +2 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.121 retrieving revision 1.503.2.122 diff -u -r1.503.2.121 -r1.503.2.122 --- WHATSNEW 17 Jul 2004 16:34:40 -0000 1.503.2.121 +++ WHATSNEW 19 Jul 2004 18:22:35 -0000 1.503.2.122 @@ -18,6 +18,8 @@ * AbstractCvsTask prematurely closed its outputStream and errorStream. Bugzilla 30097. +* Target Location was always UNKNOWN_LOCATION due to an omitted merge. + Changes from Ant 1.6.1 to Ant 1.6.2 =================================== No revision No revision 1.4.2.6 +2 -0 ant/src/main/org/apache/tools/ant/helper/AntXMLContext.java Index: AntXMLContext.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/AntXMLContext.java,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -u -r1.4.2.5 -r1.4.2.6 --- AntXMLContext.java 9 Mar 2004 17:01:32 -0000 1.4.2.5 +++ AntXMLContext.java 19 Jul 2004 18:22:36 -0000 1.4.2.6 @@ -29,6 +29,7 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; +import org.apache.tools.ant.Location; import org.apache.tools.ant.RuntimeConfigurable; @@ -109,6 +110,7 @@ public void setBuildFile(File buildFile) { this.buildFile = buildFile; this.buildFileParent = new File(buildFile.getParent()); + implicitTarget.setLocation(new Location(buildFile.getAbsolutePath())); } /** 1.33.2.14 +3 -5 ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Index: ProjectHelper2.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java,v retrieving revision 1.33.2.13 retrieving revision 1.33.2.14 diff -u -r1.33.2.13 -r1.33.2.14 --- ProjectHelper2.java 4 Jun 2004 07:39:09 -0000 1.33.2.13 +++ ProjectHelper2.java 19 Jul 2004 18:22:36 -0000 1.33.2.14 @@ -757,6 +757,7 @@ Project project = context.getProject(); Target target = new Target(); target.setProject(project); + target.setLocation(new Location(context.getLocator())); context.addTarget(target); for (int i = 0; i < attrs.getLength(); i++) { @@ -803,12 +804,9 @@ // If the name has already been defined ( import for example ) if (currentTargets.containsKey(name)) { if (!context.isIgnoringProjectTag()) { - // not in a import'ed file + // not in an import'ed file throw new BuildException( - "Duplicate target '" + name + "'", - new Location(context.getLocator().getSystemId(), - context.getLocator().getLineNumber(), - context.getLocator().getColumnNumber())); + "Duplicate target '" + name + "'", target.getLocation()); } // Alter the name. if (context.getCurrentProjectName() != null) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]