Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
On Mon, 13 Jun 2005, Martijn Kruithof [EMAIL PROTECTED] wrote: During cleaning up last weekend I noticed something funny, and hoped for a reaction. I had one prepared, but failed to send it because of technical problems ... Yes, Matt removed the timestamp check by accident with the resourceCollections commit. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
--- Stefan Bodewig [EMAIL PROTECTED] wrote: On Mon, 13 Jun 2005, Martijn Kruithof [EMAIL PROTECTED] wrote: During cleaning up last weekend I noticed something funny, and hoped for a reaction. [SNIP] Yes, Matt removed the timestamp check by accident with the resourceCollections commit. And how do YOU know it was an accident? ;) -Matt Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
On Tue, 14 Jun 2005, Matt Benson [EMAIL PROTECTED] wrote: And how do YOU know it was an accident? ;) Using my PrecognitionService[1] also known as glass orb. 8-) Stefan Footnotes: [1] this is a reference only co-workers can understand, don't worry. This stems from a SOA project that made us invent things like PerformanceService, ScalabilityService and SecurityService based on some requirements docs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
Hi During cleaning up last weekend I noticed something funny, and hoped for a reaction. Here is the request distilled out of the entire commit message: [EMAIL PROTECTED] wrote I think there is an error in ConCat, see added comment. 1.46 +4 -1 ant/src/main/org/apache/tools/ant/taskdefs/Concat.java Index: Concat.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Concat.java12 Jun 2005 15:54:14 - 1.45 +++ Concat.java12 Jun 2005 17:55:14 - 1.46 @@ -431,6 +431,10 @@ if (!outofdate) { for (Iterator i = existRc.iterator(); !outofdate i.hasNext();) { Resource r = (Resource) i.next(); +//TODO jkf, Seems the following code, or code like the +//following code is missing, can someone confirm? +//outofdate = (r.getLastModified()==0L || +//r.getLastModified() destinationFile.lastModified()) } } if (!outofdate) { Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
Yes, I think you are correct; I will commit. blush -Matt --- [EMAIL PROTECTED] wrote: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Concat.java 12 Jun 2005 15:54:14 - 1.45 +++ Concat.java 12 Jun 2005 17:55:14 - 1.46 @@ -431,6 +431,10 @@ if (!outofdate) { for (Iterator i = existRc.iterator(); !outofdate i.hasNext();) { Resource r = (Resource) i.next(); +//TODO jkf, Seems the following code, or code like the +//following code is missing, can someone confirm? +//outofdate = (r.getLastModified()==0L || +//r.getLastModified() destinationFile.lastModified()) } } if (!outofdate) { __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
jkf 2005/06/12 10:55:14 Modified:src/main/org/apache/tools/ant/taskdefs/repository HttpRepository.java src/main/org/apache/tools/ant/types/selectors/modifiedselector DigestAlgorithm.java ModifiedSelector.java src/main/org/apache/tools/ant/taskdefs/optional/ide VAJBuildInfo.java src/main/org/apache/tools/ant/taskdefs Concat.java MacroInstance.java Available.java src/main/org/apache/tools/ant IntrospectionHelper.java src/main/org/apache/tools/ant/taskdefs/optional/ssh ScpFromMessage.java src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java src/main/org/apache/tools/ant/taskdefs/optional/clearcase CCRmtype.java CCMklbtype.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Removed unused local variables. I think there is an error in ConCat, see added comment. Revision ChangesPath 1.8 +1 -2 ant/src/main/org/apache/tools/ant/taskdefs/repository/HttpRepository.java Index: HttpRepository.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/repository/HttpRepository.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- HttpRepository.java 8 Jun 2005 07:22:01 - 1.7 +++ HttpRepository.java 12 Jun 2005 17:55:14 - 1.8 @@ -169,8 +169,7 @@ try { //validate the URL -URL repository; -repository = new URL(url); +new URL(url); } catch (MalformedURLException e) { throw new BuildException(e); } 1.8 +2 -3 ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java Index: DigestAlgorithm.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- DigestAlgorithm.java 10 Jul 2004 17:15:37 - 1.7 +++ DigestAlgorithm.java 12 Jun 2005 17:55:14 - 1.8 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import java.io.File; import java.io.FileInputStream; -import java.io.FileOutputStream; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -154,7 +153,7 @@ return null; } FileInputStream fis = null; -FileOutputStream fos = null; + byte[] buf = new byte[readBufferSize]; try { messageDigest.reset(); 1.16 +0 -6 ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java Index: ModifiedSelector.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ModifiedSelector.java 7 Jan 2005 15:16:54 - 1.15 +++ ModifiedSelector.java 12 Jun 2005 17:55:14 - 1.16 @@ -393,12 +393,6 @@ } configParameter = new Vector(); -// -// - Instantiate the interfaces - -// -String className = null; -String pkg = org.apache.tools.ant.types.selectors.modifiedselector; - // specify the algorithm classname if (algoName != null) { // use Algorithm defined via name 1.17 +4 -13 ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java Index: VAJBuildInfo.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- VAJBuildInfo.java 9 Mar 2004 16:48:28 - 1.16 +++ VAJBuildInfo.java 12 Jun 2005 17:55:14 - 1.17 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2002,2004 The Apache Software Foundation + * Copyright 2001-2002,2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
stevel 2005/05/21 14:39:53 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: use of fileUtils.close Revision ChangesPath 1.56 +1 -7 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.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- ProjectHelper2.java 16 May 2005 18:59:58 - 1.55 +++ ProjectHelper2.java 21 May 2005 21:39:53 - 1.56 @@ -244,13 +244,7 @@ + buildFileName + : + exc.getMessage(), exc); } finally { -if (inputStream != null) { -try { -inputStream.close(); -} catch (IOException ioe) { -// ignore this -} -} +FileUtils.close(inputStream); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2005/05/16 11:59:58 Modified:.WHATSNEW src/testcases/org/apache/tools/ant/taskdefs ImportTest.java src/main/org/apache/tools/ant Target.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Added: src/etc/testcases/taskdefs/import a.xml b.xml c.xml Log: Allways create qualified targets in imported build files PR: 28444 Revision ChangesPath 1.822 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.821 retrieving revision 1.822 diff -u -r1.821 -r1.822 --- WHATSNEW 13 May 2005 22:12:29 - 1.821 +++ WHATSNEW 16 May 2005 18:59:57 - 1.822 @@ -200,6 +200,9 @@ can be caused by the test JVM exiting during a test, either via a System.exit() call or a JVM crash. +* project name is now used for *all* targets so one can write consistent import + build file. bugzilla report 28444. + Changes from Ant 1.6.3 to current Ant 1.6 CVS version = 1.17 +5 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java Index: ImportTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ImportTest.java 25 Apr 2005 10:15:11 - 1.16 +++ ImportTest.java 16 May 2005 18:59:57 - 1.17 @@ -163,4 +163,9 @@ configureProject(src/etc/testcases/taskdefs/import/importtargetfirst.xml); assertLogContaining(Importing targetfirstAfter target firstAfter importing); } + +public void testTargetName() { +configureProject(src/etc/testcases/taskdefs/import/c.xml); +} + } 1.59 +20 -4 ant/src/main/org/apache/tools/ant/Target.java Index: Target.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Target.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- Target.java 10 Mar 2005 12:50:57 - 1.58 +++ Target.java 16 May 2005 18:59:57 - 1.59 @@ -52,12 +52,28 @@ /** Description of this target, if any. */ private String description = null; -/** Sole constructor. */ +/** Default constructor. */ public Target() { //empty } /** + * Cloning constructor. + * @param other the Target to clone. + */ +public Target(Target other) { +this.name = other.name; +this.ifCondition = other.ifCondition; +this.unlessCondition = other.unlessCondition; +this.dependencies = other.dependencies; +this.location = other.location; +this.project = other.project; +this.description = other.description; +// The children are added to after this cloning +this.children = other.children; +} + +/** * Sets the project this target belongs to. * * @param project The project this target belongs to. @@ -209,7 +225,7 @@ * @return an enumeration of the dependencies of this target */ public Enumeration getDependencies() { -return (dependencies != null ? Collections.enumeration(dependencies) +return (dependencies != null ? Collections.enumeration(dependencies) : new CollectionUtils.EmptyEnumeration()); } @@ -222,7 +238,7 @@ public boolean dependsOn(String other) { Project p = getProject(); Hashtable t = (p == null) ? null : p.getTargets(); -return (p != null +return (p != null p.topoSort(getName(), t, false).contains(t.get(other))); } @@ -438,4 +454,4 @@ String test = project.replaceProperties(unlessCondition); return project.getProperty(test) == null; } -} \ No newline at end of file +} 1.1 ant/src/etc/testcases/taskdefs/import/a.xml Index: a.xml === project name=A target name=x/ /project 1.1 ant/src/etc/testcases/taskdefs/import/b.xml Index: b.xml === project name=B import file=a.xml/ target name=x depends=A.x/ /project 1.1 ant/src/etc/testcases/taskdefs/import/c.xml Index: c.xml === project name=C import file=a.xml/ import
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/11/18 01:48:59 Modified:.WHATSNEW src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Set the location for the default target (the location will be the project tag) PR: 32267 Reported by: Yves Martin Revision ChangesPath 1.686 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.685 retrieving revision 1.686 diff -u -r1.685 -r1.686 --- WHATSNEW 16 Nov 2004 21:46:46 - 1.685 +++ WHATSNEW 18 Nov 2004 09:48:59 - 1.686 @@ -157,6 +157,9 @@ * 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 === 1.51 +3 -0 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.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- ProjectHelper2.java 12 Nov 2004 11:07:12 - 1.50 +++ ProjectHelper2.java 18 Nov 2004 09:48:59 - 1.51 @@ -601,6 +601,9 @@ 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) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/11/18 01:49:25 Modified:.Tag: ANT_16_BRANCH WHATSNEW src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: sync Revision ChangesPath No revision No revision 1.503.2.144 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.143 retrieving revision 1.503.2.144 diff -u -r1.503.2.143 -r1.503.2.144 --- WHATSNEW 28 Oct 2004 08:48:48 - 1.503.2.143 +++ WHATSNEW 18 Nov 2004 09:49:24 - 1.503.2.144 @@ -66,6 +66,9 @@ * 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 === No revision No revision 1.33.2.18 +3 -0 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.17 retrieving revision 1.33.2.18 diff -u -r1.33.2.17 -r1.33.2.18 --- ProjectHelper2.java 12 Nov 2004 11:08:00 - 1.33.2.17 +++ ProjectHelper2.java 18 Nov 2004 09:49:25 - 1.33.2.18 @@ -601,6 +601,9 @@ 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) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
bodewig 2004/10/26 07:56:55 Modified:.CONTRIBUTORS src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Better error reporting when users set the wrong default namespace. PR: 30660 Submitted by: Kevin Greiner kgreiner at xpediantsolutions dot com Revision ChangesPath 1.35 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS === RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- CONTRIBUTORS 20 Oct 2004 08:38:04 - 1.34 +++ CONTRIBUTORS 26 Oct 2004 14:56:55 - 1.35 @@ -104,6 +104,7 @@ Juerg Wanner Keiron Liddle Keith Visco +Kevin Greiner Kevin Ross Kevin Z Grey Kirk Wylie 1.49 +11 -1 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.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- ProjectHelper2.java 30 Sep 2004 17:05:38 - 1.48 +++ ProjectHelper2.java 26 Oct 2004 14:56:55 - 1.49 @@ -220,6 +220,8 @@ be.setLocation(location); } throw be; +} else if (t == null) { +t = exc; } throw new BuildException(exc.getMessage(), t, location); @@ -227,6 +229,8 @@ Throwable t = exc.getException(); if (t instanceof BuildException) { throw (BuildException) t; +} else if (t == null) { +t = exc; } throw new BuildException(exc.getMessage(), t); } catch (FileNotFoundException exc) { @@ -552,8 +556,14 @@ // if (qname.equals( target ) ) // return ProjectHelper2.targetHandler; // } -throw new SAXParseException(Unexpected element \ + qname +if (name.equals(qname)) { +throw new SAXParseException(Unexpected element \{ + uri ++ } + name + \ { + ANT_CORE_URI + } + name, +context.getLocator()); +} else { +throw new SAXParseException(Unexpected element \ + qname + \ + name, context.getLocator()); +} } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
bodewig 2004/10/26 07:57:26 Modified:.Tag: ANT_16_BRANCH CONTRIBUTORS src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: merge Revision ChangesPath No revision No revision 1.1.2.25 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS === RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.1.2.24 retrieving revision 1.1.2.25 diff -u -r1.1.2.24 -r1.1.2.25 --- CONTRIBUTORS 30 Sep 2004 09:26:23 - 1.1.2.24 +++ CONTRIBUTORS 26 Oct 2004 14:57:26 - 1.1.2.25 @@ -104,6 +104,7 @@ Juerg Wanner Keiron Liddle Keith Visco +Kevin Greiner Kevin Ross Kevin Z Grey Kirk Wylie No revision No revision 1.33.2.16 +11 -1 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.15 retrieving revision 1.33.2.16 diff -u -r1.33.2.15 -r1.33.2.16 --- ProjectHelper2.java 30 Sep 2004 17:34:05 - 1.33.2.15 +++ ProjectHelper2.java 26 Oct 2004 14:57:26 - 1.33.2.16 @@ -220,6 +220,8 @@ be.setLocation(location); } throw be; +} else if (t == null) { +t = exc; } throw new BuildException(exc.getMessage(), t, location); @@ -227,6 +229,8 @@ Throwable t = exc.getException(); if (t instanceof BuildException) { throw (BuildException) t; +} else if (t == null) { +t = exc; } throw new BuildException(exc.getMessage(), t); } catch (FileNotFoundException exc) { @@ -552,8 +556,14 @@ // if (qname.equals( target ) ) // return ProjectHelper2.targetHandler; // } -throw new SAXParseException(Unexpected element \ + qname +if (name.equals(qname)) { +throw new SAXParseException(Unexpected element \{ + uri ++ } + name + \ { + ANT_CORE_URI + } + name, +context.getLocator()); +} else { +throw new SAXParseException(Unexpected element \ + qname + \ + name, context.getLocator()); +} } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/09/30 10:05:38 Modified:.WHATSNEW src/testcases/org/apache/tools/ant/taskdefs ImportTest.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Added: src/etc/testcases/taskdefs/import targetfirst.xml importtargetfirst.xml Log: Fix for execution of top level tasks getting delayed by targets. PR: 31487 Revision ChangesPath 1.668 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.667 retrieving revision 1.668 diff -u -r1.667 -r1.668 --- WHATSNEW 24 Sep 2004 18:55:16 - 1.667 +++ WHATSNEW 30 Sep 2004 17:05:37 - 1.668 @@ -26,6 +26,9 @@ * Incorrect task name with invalid javac task after a presetdef. Bugzilla reports 31389 and 29499. +* Execution of top level tasks in imported files get delayed by targets. + Bugzilla report 31487. + Other changes: -- 1.1 ant/src/etc/testcases/taskdefs/import/targetfirst.xml Index: targetfirst.xml === project target name=first/ echoAfter target first/echo /project 1.1 ant/src/etc/testcases/taskdefs/import/importtargetfirst.xml Index: importtargetfirst.xml === project echoImporting targetfirst/echo import file=targetfirst.xml/ echoAfter importing/echo /project 1.14 +4 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java Index: ImportTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ImportTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ImportTest.java 28 Apr 2004 09:01:08 - 1.13 +++ ImportTest.java 30 Sep 2004 17:05:38 - 1.14 @@ -142,4 +142,8 @@ } } +public void testTargetFirst() { + configureProject(src/etc/testcases/taskdefs/import/importtargetfirst.xml); +assertLogContaining(Importing targetfirstAfter target firstAfter importing); +} } 1.48 +3 -0 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.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- ProjectHelper2.java 24 May 2004 15:09:57 - 1.47 +++ ProjectHelper2.java 30 Sep 2004 17:05:38 - 1.48 @@ -116,15 +116,18 @@ // we are in an imported file. context.setIgnoreProjectTag(true); Target currentTarget = context.getCurrentTarget(); +Target currentImplicit = context.getImplicitTarget(); try { Target newCurrent = new Target(); newCurrent.setProject(project); newCurrent.setName(); context.setCurrentTarget(newCurrent); +context.setImplicitTarget(newCurrent); parse(project, source, new RootHandler(context, mainHandler)); newCurrent.execute(); } finally { context.setCurrentTarget(currentTarget); +context.setImplicitTarget(currentImplicit); } } else { // top level file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/09/30 10:34:05 Modified:.Tag: ANT_16_BRANCH WHATSNEW src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: sync (minus the unit tests) Revision ChangesPath No revision No revision 1.503.2.139 +3 -0 ant/WHATSNEW Index: WHATSNEW === RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.138 retrieving revision 1.503.2.139 diff -u -r1.503.2.138 -r1.503.2.139 --- WHATSNEW 24 Sep 2004 22:29:09 - 1.503.2.138 +++ WHATSNEW 30 Sep 2004 17:34:05 - 1.503.2.139 @@ -51,6 +51,9 @@ * Typo in definition of cvsversion task causing it not to be defined. Bugzilla 31403. +* Execution of top level tasks in imported files get delayed by targets. + Bugzilla report 31487. + Changes from Ant 1.6.1 to Ant 1.6.2 === No revision No revision 1.33.2.15 +3 -0 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.14 retrieving revision 1.33.2.15 diff -u -r1.33.2.14 -r1.33.2.15 --- ProjectHelper2.java 19 Jul 2004 18:22:36 - 1.33.2.14 +++ ProjectHelper2.java 30 Sep 2004 17:34:05 - 1.33.2.15 @@ -116,15 +116,18 @@ // we are in an imported file. context.setIgnoreProjectTag(true); Target currentTarget = context.getCurrentTarget(); +Target currentImplicit = context.getImplicitTarget(); try { Target newCurrent = new Target(); newCurrent.setProject(project); newCurrent.setName(); context.setCurrentTarget(newCurrent); +context.setImplicitTarget(newCurrent); parse(project, source, new RootHandler(context, mainHandler)); newCurrent.execute(); } finally { context.setCurrentTarget(currentTarget); +context.setImplicitTarget(currentImplicit); } } else { // top level file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/03/10 01:24:02 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: fix if build file name has ../ or ./ PR: 26765 Reported by: Ian E. Gorman Revision ChangesPath 1.44 +1 -1 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.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- ProjectHelper2.java 9 Mar 2004 16:48:03 - 1.43 +++ ProjectHelper2.java 10 Mar 2004 09:24:02 - 1.44 @@ -154,7 +154,7 @@ if (source instanceof File) { buildFile = (File) source; -buildFile = new File(buildFile.getAbsolutePath()); +buildFile = fu.normalize(buildFile.getAbsolutePath()); context.setBuildFile(buildFile); buildFileName = buildFile.toString(); // } else if (source instanceof InputStream ) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2004/03/10 01:34:21 Modified:src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: sync with head Revision ChangesPath No revision No revision 1.33.2.11 +1 -1 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.10 retrieving revision 1.33.2.11 diff -u -r1.33.2.10 -r1.33.2.11 --- ProjectHelper2.java 9 Mar 2004 17:01:32 - 1.33.2.10 +++ ProjectHelper2.java 10 Mar 2004 09:34:21 - 1.33.2.11 @@ -154,7 +154,7 @@ if (source instanceof File) { buildFile = (File) source; -buildFile = new File(buildFile.getAbsolutePath()); +buildFile = fu.normalize(buildFile.getAbsolutePath()); context.setBuildFile(buildFile); buildFileName = buildFile.toString(); // } else if (source instanceof InputStream ) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2003/12/17 07:36:34 Modified:src/main/org/apache/tools/ant IntrospectionHelper.java UnknownElement.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: * Retain difference between and antlib:org.apache.tools.ant namespaces in UE.getNamespace() * Remove near duplicate method in IntrospectionHelper * Add UnknownElement to signature of IntrospectionHelper#getElementCreator for future xml Namespace use Revision ChangesPath 1.70 +5 -41 ant/src/main/org/apache/tools/ant/IntrospectionHelper.java Index: IntrospectionHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- IntrospectionHelper.java 11 Dec 2003 17:21:05 - 1.69 +++ IntrospectionHelper.java 17 Dec 2003 15:36:34 - 1.70 @@ -603,45 +603,6 @@ throw new BuildException(msg); } -private NestedCreator getNestedCreator(Project project, Object parent, -String elementName) throws BuildException { - -NestedCreator nc = (NestedCreator) nestedCreators.get( -elementName.toLowerCase(Locale.US)); -if (nc == null) { -nc = createAddTypeCreator(project, parent, elementName); -} -if (nc == null parent instanceof DynamicConfigurator) { -DynamicConfigurator dc = (DynamicConfigurator) parent; -final Object nestedElement = dc.createDynamicElement(elementName); -if (nestedElement != null) { -nc = new NestedCreator() { -public boolean isPolyMorphic() { -return false; -} -public Class getElementClass() { -return null; -} - -public Object getRealObject() { -return null; -} - -public Object create( -Project project, Object parent, Object ignore) { -return nestedElement; -} -public void store(Object parent, Object child) { -} -}; -} -} -if (nc == null) { -throwNotSupported(project, parent, elementName); -} -return nc; -} - private NestedCreator getNestedCreator( Project project, String parentUri, Object parent, String elementName) throws BuildException { @@ -705,6 +666,7 @@ *Must not be codenull/code. * * @return an instance of the specified element type + * @deprecated This is not a namespace aware method. * * @exception BuildException if no method is available to create the * element instance, or if the creating method @@ -712,7 +674,7 @@ */ public Object createElement(Project project, Object parent, String elementName) throws BuildException { -NestedCreator nc = getNestedCreator(project, parent, elementName); +NestedCreator nc = getNestedCreator(project, , parent, elementName); try { Object nestedElement = nc.create(project, parent, null); if (project != null) { @@ -743,11 +705,13 @@ * @param parent Parent object used to create the creator object to * create and store and instance of a subelement. * @param elementName Name of the element to create an instance of. + * @param ue The unknown element associated with the element. * @return a creator object to create and store the element instance. */ public Creator getElementCreator( -Project project, String parentUri, Object parent, String elementName) { +Project project, String parentUri, Object parent, String elementName, +UnknownElement ue) { NestedCreator nc = getNestedCreator( project, parentUri, parent, elementName); return new Creator(project, parent, nc); 1.71 +2 -1 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- UnknownElement.java 24 Nov 2003 09:15:41 - 1.70 +++ UnknownElement.java 17 Dec 2003 15:36:34 - 1.71 @@ -564,7 +564,8 @@ child.getNamespace(), child.getTag());
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2003/12/17 07:37:27 Modified:src/main/org/apache/tools/ant Tag: ANT_16_BRANCH IntrospectionHelper.java UnknownElement.java src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: sync with HEAD Revision ChangesPath No revision No revision 1.65.2.5 +5 -41 ant/src/main/org/apache/tools/ant/IntrospectionHelper.java Index: IntrospectionHelper.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v retrieving revision 1.65.2.4 retrieving revision 1.65.2.5 diff -u -r1.65.2.4 -r1.65.2.5 --- IntrospectionHelper.java 11 Dec 2003 17:25:07 - 1.65.2.4 +++ IntrospectionHelper.java 17 Dec 2003 15:37:27 - 1.65.2.5 @@ -603,45 +603,6 @@ throw new BuildException(msg); } -private NestedCreator getNestedCreator(Project project, Object parent, -String elementName) throws BuildException { - -NestedCreator nc = (NestedCreator) nestedCreators.get( -elementName.toLowerCase(Locale.US)); -if (nc == null) { -nc = createAddTypeCreator(project, parent, elementName); -} -if (nc == null parent instanceof DynamicConfigurator) { -DynamicConfigurator dc = (DynamicConfigurator) parent; -final Object nestedElement = dc.createDynamicElement(elementName); -if (nestedElement != null) { -nc = new NestedCreator() { -public boolean isPolyMorphic() { -return false; -} -public Class getElementClass() { -return null; -} - -public Object getRealObject() { -return null; -} - -public Object create( -Project project, Object parent, Object ignore) { -return nestedElement; -} -public void store(Object parent, Object child) { -} -}; -} -} -if (nc == null) { -throwNotSupported(project, parent, elementName); -} -return nc; -} - private NestedCreator getNestedCreator( Project project, String parentUri, Object parent, String elementName) throws BuildException { @@ -705,6 +666,7 @@ *Must not be codenull/code. * * @return an instance of the specified element type + * @deprecated This is not a namespace aware method. * * @exception BuildException if no method is available to create the * element instance, or if the creating method @@ -712,7 +674,7 @@ */ public Object createElement(Project project, Object parent, String elementName) throws BuildException { -NestedCreator nc = getNestedCreator(project, parent, elementName); +NestedCreator nc = getNestedCreator(project, , parent, elementName); try { Object nestedElement = nc.create(project, parent, null); if (project != null) { @@ -743,11 +705,13 @@ * @param parent Parent object used to create the creator object to * create and store and instance of a subelement. * @param elementName Name of the element to create an instance of. + * @param ue The unknown element associated with the element. * @return a creator object to create and store the element instance. */ public Creator getElementCreator( -Project project, String parentUri, Object parent, String elementName) { +Project project, String parentUri, Object parent, String elementName, +UnknownElement ue) { NestedCreator nc = getNestedCreator( project, parentUri, parent, elementName); return new Creator(project, parent, nc); 1.63.2.7 +2 -1 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.63.2.6 retrieving revision 1.63.2.7 diff -u -r1.63.2.6 -r1.63.2.7 --- UnknownElement.java 24 Nov 2003 09:20:41 - 1.63.2.6 +++ UnknownElement.java 17 Dec 2003 15:37:27 - 1.63.2.7 @@ -564,7 +564,8 @@ child.getNamespace(), child.getTag()); if (ih.supportsNestedElement(parentUri, childName)) {
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2003/11/18 09:06:58 Modified:src/testcases/org/apache/tools/ant/taskdefs XmlnsTest.java src/etc/testcases/taskdefs xmlns.xml src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Ignore attributes for different uris. Revision ChangesPath 1.3 +8 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/XmlnsTest.java Index: XmlnsTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/XmlnsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XmlnsTest.java13 Aug 2003 13:36:36 - 1.2 +++ XmlnsTest.java18 Nov 2003 17:06:58 - 1.3 @@ -88,6 +88,14 @@ Attempt to use a reserved URI ant:notallowed); } +public void testOther() { +expectLog(other, a message); +} + +public void testNsAttributes() { +expectLog(ns.attributes, hello world); +} + public static class MyTask extends Task { public void execute() { log(MyTask called); 1.3 +12 -1 ant/src/etc/testcases/taskdefs/xmlns.xml Index: xmlns.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/xmlns.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- xmlns.xml 29 Oct 2003 10:18:13 - 1.2 +++ xmlns.xml 18 Nov 2003 17:06:58 - 1.3 @@ -1,5 +1,6 @@ ?xml version=1.0? -project name=test +project name=test xmlns:other=this is the other uri + other:attr=this should be ignored by ant property name=testcases.dir location=../../../../build/testcases/ @@ -14,6 +15,16 @@ name=mytask uri=this.is.another.test.uri / test:mytask/ + /target + + target name=other other:a=this is another attribute +echo other:g=abc message=a message/ + /target + + target name=ns.attributes +taskdef name=my.echo classname=org.apache.tools.ant.taskdefs.Echo + uri=x-uri/ +x:my.echo x:message=hello world xmlns:x=x-uri/ /target target name=xmlns.file xmlns:test=this.is.a.test.uri 1.37 +19 -1 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.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- ProjectHelper2.java 18 Nov 2003 10:51:41 - 1.36 +++ ProjectHelper2.java 18 Nov 2003 17:06:58 - 1.37 @@ -645,9 +645,15 @@ */ for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String key = attrs.getLocalName(i); String value = attrs.getValue(i); - + if (key.equals(default)) { if (value != null !value.equals()) { if (!context.isIgnoringProjectTag()) { @@ -797,6 +803,12 @@ context.addTarget(target); for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String key = attrs.getLocalName(i); String value = attrs.getValue(i); @@ -967,6 +979,12 @@ = new RuntimeConfigurable(task, task.getTaskName()); for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String name = attrs.getLocalName(i); String value = attrs.getValue(i); // PR: Hack for ant-type value - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2003/11/18 09:07:24 Modified:src/testcases/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH XmlnsTest.java src/etc/testcases/taskdefs Tag: ANT_16_BRANCH xmlns.xml src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: Sync with HEAD Revision ChangesPath No revision No revision 1.2.2.1 +8 -0 ant/src/testcases/org/apache/tools/ant/taskdefs/XmlnsTest.java Index: XmlnsTest.java === RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/XmlnsTest.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- XmlnsTest.java13 Aug 2003 13:36:36 - 1.2 +++ XmlnsTest.java18 Nov 2003 17:07:24 - 1.2.2.1 @@ -88,6 +88,14 @@ Attempt to use a reserved URI ant:notallowed); } +public void testOther() { +expectLog(other, a message); +} + +public void testNsAttributes() { +expectLog(ns.attributes, hello world); +} + public static class MyTask extends Task { public void execute() { log(MyTask called); No revision No revision 1.1.2.2 +12 -1 ant/src/etc/testcases/taskdefs/xmlns.xml Index: xmlns.xml === RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/xmlns.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- xmlns.xml 29 Oct 2003 10:21:13 - 1.1.2.1 +++ xmlns.xml 18 Nov 2003 17:07:24 - 1.1.2.2 @@ -1,5 +1,6 @@ ?xml version=1.0? -project name=test +project name=test xmlns:other=this is the other uri + other:attr=this should be ignored by ant property name=testcases.dir location=../../../../build/testcases/ @@ -14,6 +15,16 @@ name=mytask uri=this.is.another.test.uri / test:mytask/ + /target + + target name=other other:a=this is another attribute +echo other:g=abc message=a message/ + /target + + target name=ns.attributes +taskdef name=my.echo classname=org.apache.tools.ant.taskdefs.Echo + uri=x-uri/ +x:my.echo x:message=hello world xmlns:x=x-uri/ /target target name=xmlns.file xmlns:test=this.is.a.test.uri No revision No revision 1.33.2.4 +19 -1 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.3 retrieving revision 1.33.2.4 diff -u -r1.33.2.3 -r1.33.2.4 --- ProjectHelper2.java 18 Nov 2003 11:29:06 - 1.33.2.3 +++ ProjectHelper2.java 18 Nov 2003 17:07:24 - 1.33.2.4 @@ -645,9 +645,15 @@ */ for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String key = attrs.getLocalName(i); String value = attrs.getValue(i); - + if (key.equals(default)) { if (value != null !value.equals()) { if (!context.isIgnoringProjectTag()) { @@ -797,6 +803,12 @@ context.addTarget(target); for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String key = attrs.getLocalName(i); String value = attrs.getValue(i); @@ -967,6 +979,12 @@ = new RuntimeConfigurable(task, task.getTaskName()); for (int i = 0; i attrs.getLength(); i++) { +String attrUri = attrs.getURI(i); +if (attrUri != null + !attrUri.equals() + !attrUri.equals(uri)) { +continue; // Ignore attributes from unknown uris +} String name = attrs.getLocalName(i); String value = attrs.getValue(i); // PR: Hack for ant-type value
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
bodewig 2003/11/03 07:47:30 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Improve error message Revision ChangesPath 1.35 +6 -4 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.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- ProjectHelper2.java 20 Oct 2003 14:13:40 - 1.34 +++ ProjectHelper2.java 3 Nov 2003 15:47:30 - 1.35 @@ -268,11 +268,13 @@ } catch (FileNotFoundException exc) { throw new BuildException(exc); } catch (UnsupportedEncodingException exc) { - throw new BuildException(Encoding of project file is invalid., -exc); + throw new BuildException(Encoding of project file + + buildFileName + is invalid., + exc); } catch (IOException exc) { -throw new BuildException(Error reading project file: -+ exc.getMessage(), exc); +throw new BuildException(Error reading project file + + buildFileName + : + exc.getMessage(), + exc); } finally { if (inputStream != null) { try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
bodewig 2003/11/03 07:48:24 Modified:src/main/org/apache/tools/ant/helper Tag: ANT_16_BRANCH ProjectHelper2.java Log: Merge from HEAD Revision ChangesPath No revision No revision 1.33.2.2 +6 -4 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.1 retrieving revision 1.33.2.2 diff -u -r1.33.2.1 -r1.33.2.2 --- ProjectHelper2.java 20 Oct 2003 14:18:35 - 1.33.2.1 +++ ProjectHelper2.java 3 Nov 2003 15:48:24 - 1.33.2.2 @@ -268,11 +268,13 @@ } catch (FileNotFoundException exc) { throw new BuildException(exc); } catch (UnsupportedEncodingException exc) { - throw new BuildException(Encoding of project file is invalid., -exc); + throw new BuildException(Encoding of project file + + buildFileName + is invalid., + exc); } catch (IOException exc) { -throw new BuildException(Error reading project file: -+ exc.getMessage(), exc); +throw new BuildException(Error reading project file + + buildFileName + : + exc.getMessage(), + exc); } finally { if (inputStream != null) { try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
peterreilly2003/09/17 07:13:54 Modified:src/main/org/apache/tools/ant Target.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: change implementation of handling importing files top-level tasks to be less hachy Revision ChangesPath 1.45 +3 -29 ant/src/main/org/apache/tools/ant/Target.java Index: Target.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Target.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- Target.java 4 Sep 2003 11:46:03 - 1.44 +++ Target.java 17 Sep 2003 14:13:53 - 1.45 @@ -80,15 +80,11 @@ private List dependencies = null; /** Children of this target (tasks and data types). */ private List children = new ArrayList(); -/** Position in task list */ -private int taskPosition = 0; /** Project this target belongs to. */ private Project project; -/** Description of this target, if any. */ + private String description = null; -/** Imported tasks/types being added */ -private List importedTasks = null; /** Sole constructor. */ public Target() { @@ -171,34 +167,12 @@ } /** - * This method called when an import file is being processed. - * The top-level tasks/types are placed in the importedTasks array. - * - */ -public void startImportedTasks() { -importedTasks = new ArrayList(); -} - -/** * Adds a task to this target. * * @param task The task to be added. Must not be codenull/code. */ public void addTask(Task task) { -if (importedTasks != null) { -importedTasks.add(task); -} else { -children.add(task); -} -} - -/** - * This method called when an import file is being processed. - * The top-level tasks/types are placed in the importedTasks array. - * - */ -public void endImportedTasks() { -children.addAll(taskPosition + 1, importedTasks); +children.add(task); } /** @@ -354,7 +328,7 @@ */ public void execute() throws BuildException { if (testIfCondition() testUnlessCondition()) { -for (taskPosition = 0; +for (int taskPosition = 0; taskPosition children.size(); ++taskPosition) { Object o = children.get(taskPosition); 1.33 +10 -3 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.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- ProjectHelper2.java 12 Sep 2003 20:56:46 - 1.32 +++ ProjectHelper2.java 17 Sep 2003 14:13:53 - 1.33 @@ -154,9 +154,16 @@ if (getImportStack().size() 1) { // we are in an imported file. context.setIgnoreProjectTag(true); -context.getCurrentTarget().startImportedTasks(); -parse(project, source, new RootHandler(context, mainHandler)); -context.getCurrentTarget().endImportedTasks(); +Target currentTarget = context.getCurrentTarget(); +try { +Target newCurrent = new Target(); +newCurrent.setName(); +context.setCurrentTarget(newCurrent); +parse(project, source, new RootHandler(context, mainHandler)); +newCurrent.execute(); +} finally { +context.setCurrentTarget(currentTarget); +} } else { // top level file parse(project, source, new RootHandler(context, mainHandler)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
stevel 2003/07/31 22:52:31 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: I cant believe we never noticed this typo before Revision ChangesPath 1.28 +1 -1 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.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- ProjectHelper2.java 24 Jul 2003 13:48:45 - 1.27 +++ ProjectHelper2.java 1 Aug 2003 05:52:31 - 1.28 @@ -228,7 +228,7 @@ inputSource.setSystemId(uri); } project.log(parsing buildfile + buildFileName -+ with URI = + uri, Project.MSG_VERBOSE); ++ with URI = + uri, Project.MSG_VERBOSE); DefaultHandler hb = handler; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
On Friday 01 August 2003 06:52, [EMAIL PROTECTED] wrote: stevel 2003/07/31 22:52:31 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: I cant believe we never noticed this typo before Possibly because I introduced it in revision 1.27 0-) Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
costin 2003/05/03 07:30:26 Modified:src/main/org/apache/tools/ant UnknownElement.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Plug the namespace uri. One way or another - we'll need it. Also fix the qname - we need to use the localname. Originally used qname to avoid breaking build files that used : ( they still needed to declare a namespace for that previx - otherwise SAX would complain ). ( not sure about the last part - I think some parsers, when validation is off, will allow : to be used and pass whatever was used as qname ). Revision ChangesPath 1.49 +22 -0 ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- UnknownElement.java 28 Apr 2003 12:42:47 - 1.48 +++ UnknownElement.java 3 May 2003 14:30:25 - 1.49 @@ -73,6 +73,11 @@ * been redefined since original creation. */ private String elementName; + +/** + * Holds the namespace of the element. + */ +private String namespace; /** * The real object after it has been loaded. @@ -103,6 +108,23 @@ */ public String getTag() { return elementName; +} + +/** Return the namespace of the XML element associated with this component. + * + * @return Namespace URI used in the xmlns declaration. + */ +public String getNamespace() { +return namespace; +} + +/** Set the namespace of the XML element associated with this component. + * This method is typically called by the XML processor. + * + * @param namespace URI used in the xmlns declaration. + */ +public void setNamespace(String namespace) { +this.namespace = namespace; } /** 1.19 +2 -1 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.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ProjectHelper2.java 28 Apr 2003 12:19:18 - 1.18 +++ ProjectHelper2.java 3 May 2003 14:30:26 - 1.19 @@ -753,7 +753,8 @@ /* UnknownElement is used for tasks and data types - with delayed eval */ -UnknownElement task = new UnknownElement(qname); +UnknownElement task = new UnknownElement(tag); +task.setNamespace(uri); task.setProject(context.getProject()); //XXX task.setTaskType(qname);
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
bodewig 2003/04/28 05:19:18 Modified:.build.xml src/main/org/apache/tools/ant RuntimeConfigurable.java UnknownElement.java src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Enable mixed-case task names inside task-containers while trying to keep backwards compatibility for all other cases (all normal nested element names get converted to lower case). PR: 19323 Revision ChangesPath 1.373 +1 -0 ant/build.xml Index: build.xml === RCS file: /home/cvs/ant/build.xml,v retrieving revision 1.372 retrieving revision 1.373 diff -u -r1.372 -r1.373 --- build.xml 25 Apr 2003 14:21:35 - 1.372 +++ build.xml 28 Apr 2003 12:19:17 - 1.373 @@ -277,6 +277,7 @@ patternset id=teststhatfail exclude name=${optional.package}/BeanShellScriptTest.java/ exclude name=${ant.package}/taskdefs/ImportTest.java/ +exclude name=${ant.package}/CaseTest.java/ /patternset !-- 1.32 +22 -9 ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java Index: RuntimeConfigurable.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- RuntimeConfigurable.java 14 Apr 2003 11:58:03 - 1.31 +++ RuntimeConfigurable.java 28 Apr 2003 12:19:17 - 1.32 @@ -348,16 +348,29 @@ childTask.setRuntimeConfigurableWrapper(child); } -if (configureChildren - ih.supportsNestedElement(child.getElementTag())) { -child.maybeConfigure(p); -Object container = wrappedObject; -if (container instanceof TaskAdapter) { -container = ((TaskAdapter) container).getProxy(); +if (configureChildren) { +/* + * backwards compatibility - element names of nested + * elements have been all lower-case in Ant, except for + * TaskContainers + */ + +/* XXX + * + * For some reason we don't throw an exception here if + * we find the nested element is unsupported, probably + * because this will happen somewhere else. + */ +String tag = child.getElementTag(); +if (ih.supportsNestedElement(tag.toLowerCase(Locale.US))) { +tag = tag.toLowerCase(Locale.US); +} else if (!ih.supportsNestedElement(tag)) { +continue; } -ProjectHelper.storeChild(p, container, child.wrappedObject, -child.getElementTag() -.toLowerCase(Locale.US)); + +child.maybeConfigure(p); +ProjectHelper.storeChild(p, target, child.wrappedObject, + tag); } } 1.47 +39 -17ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java === RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- UnknownElement.java 14 Apr 2003 14:47:42 - 1.46 +++ UnknownElement.java 28 Apr 2003 12:19:18 - 1.47 @@ -54,6 +54,7 @@ package org.apache.tools.ant; +import java.util.Locale; import java.util.Vector; import java.io.IOException; @@ -273,26 +274,20 @@ UnknownElement child = (UnknownElement) children.elementAt(i); Object realChild = null; -if (ih.supportsNestedElement(child.getTag())) { -realChild -= ih.createElement(getProject(), parent, child.getTag()); -childWrapper.setProxy(realChild); -if (realChild instanceof Task) { -Task childTask = (Task) realChild; -childTask.setRuntimeConfigurableWrapper(childWrapper); -childTask.setTaskName(child.getTag()); -childTask.setTaskType(child.getTag()); -} -child.handleChildren(realChild, childWrapper); - +if (handleChild(ih, parent, child, +child.getTag().toLowerCase(Locale.US), +childWrapper)) { } else if (!(parent instanceof TaskContainer)) {
cvs commit: ant/src/main/org/apache/tools/ant/helper ProjectHelper2.java
conor 2003/04/06 01:30:57 Modified:src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Fix up handling of TaskContainer configuration. Revision ChangesPath 1.17 +2 -7 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.16 retrieving revision 1.17 diff -u -w -u -r1.16 -r1.17 --- ProjectHelper2.java 1 Apr 2003 14:59:58 - 1.16 +++ ProjectHelper2.java 6 Apr 2003 09:30:57 - 1.17 @@ -745,7 +745,6 @@ AntXMLContext context) throws SAXParseException { RuntimeConfigurable parentWrapper = context.currentWrapper(); -RuntimeConfigurable wrapper = null; Object parent = null; if (parentWrapper != null) { @@ -796,7 +795,8 @@ // container.addTask(task); // This is a nop in UE: task.init(); -wrapper = new RuntimeConfigurable(task, task.getTaskName()); +RuntimeConfigurable wrapper += new RuntimeConfigurable(task, task.getTaskName()); for (int i = 0; i attrs.getLength(); i++) { wrapper.setAttribute(attrs.getQName(i), @@ -851,11 +851,6 @@ public void onEndElement(String uri, String tag, AntXMLContext context) { context.popWrapper(); -} - -public void onEndChild(String uri, String tag, String qname, - AntXMLContext context) -throws SAXParseException { } } }