Antcall was broken since the ProjectComponent check is too agressive Now only applies to data types. The Ant task is perhaps a little special in that it returns a task for one of its nested elements. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269463 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -240,16 +240,18 @@ | |||
| </fileset> | |||
| </copy> | |||
| <filter token="VERSION" value="${version}" /> | |||
| <filter token="DATE" value="${TODAY}" /> | |||
| <filter token="TIME" value="${TSTAMP}" /> | |||
| <copy todir="${build.classes}" | |||
| overwrite="true" | |||
| filtering="on"> | |||
| overwrite="true"> | |||
| <fileset dir="${java.dir}"> | |||
| <include name="**/version.txt" /> | |||
| <include name="**/defaultManifest.mf" /> | |||
| </fileset> | |||
| <filterset> | |||
| <filter token="VERSION" value="${version}" /> | |||
| <filter token="DATE" value="${TODAY}" /> | |||
| <filter token="TIME" value="${TSTAMP}" /> | |||
| </filterset> | |||
| </copy> | |||
| <copy todir="${build.classes}/${optional.package}/junit"> | |||
| @@ -308,6 +310,7 @@ | |||
| <fileset dir="${script.dir}/" /> | |||
| </copy> | |||
| <!-- | |||
| <fixcrlf srcdir="${dist.bin}" eol="crlf" includes="*.bat" /> | |||
| <fixcrlf srcdir="${dist.bin}" eol="lf"> | |||
| <include name="ant" /> | |||
| @@ -324,7 +327,8 @@ | |||
| <include name="**/runant.pl" /> | |||
| </fileset> | |||
| </chmod> | |||
| --> | |||
| </target> | |||
| <!-- | |||
| @@ -187,7 +187,7 @@ public class FileUtils { | |||
| parent.mkdirs(); | |||
| } | |||
| if (filterSet != null) { | |||
| if (filterSet != null && filterSet.hasFilters()) { | |||
| BufferedReader in = new BufferedReader(new FileReader(sourceFile)); | |||
| BufferedWriter out = new BufferedWriter(new FileWriter(destFile)); | |||
| @@ -55,6 +55,7 @@ | |||
| package org.apache.tools.ant; | |||
| import org.apache.tools.ant.types.Path; | |||
| import org.apache.tools.ant.types.DataType; | |||
| import org.apache.tools.ant.types.EnumeratedAttribute; | |||
| import java.lang.reflect.*; | |||
| @@ -323,8 +324,8 @@ public class IntrospectionHelper implements BuildListener { | |||
| } | |||
| try { | |||
| Object nestedElement = nc.create(element); | |||
| if (nestedElement instanceof ProjectComponent) { | |||
| ((ProjectComponent)nestedElement).setProject(project); | |||
| if (nestedElement instanceof DataType) { | |||
| ((DataType)nestedElement).setProject(project); | |||
| } | |||
| return nestedElement; | |||
| } catch (IllegalAccessException ie) { | |||
| @@ -570,8 +571,8 @@ public class IntrospectionHelper implements BuildListener { | |||
| throws InvocationTargetException, IllegalAccessException, BuildException { | |||
| try { | |||
| Object attribute = c.newInstance(new String[] {value}); | |||
| if (attribute instanceof ProjectComponent) { | |||
| ((ProjectComponent)attribute).setProject(p); | |||
| if (attribute instanceof DataType) { | |||
| ((DataType)attribute).setProject(p); | |||
| } | |||
| m.invoke(parent, new Object[] {attribute}); | |||
| } catch (InstantiationException ie) { | |||
| @@ -698,6 +698,8 @@ public class Project { | |||
| * specifying if token filtering must be used. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(String sourceFile, String destFile, boolean filtering) | |||
| throws IOException { | |||
| @@ -710,6 +712,8 @@ public class Project { | |||
| * source files may overwrite newer destination files. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(String sourceFile, String destFile, boolean filtering, | |||
| boolean overwrite) throws IOException { | |||
| @@ -724,6 +728,8 @@ public class Project { | |||
| * to the last modified time of <code>sourceFile</code>. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(String sourceFile, String destFile, boolean filtering, | |||
| boolean overwrite, boolean preserveLastModified) | |||
| @@ -737,6 +743,8 @@ public class Project { | |||
| * No filtering is performed. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(File sourceFile, File destFile) throws IOException { | |||
| FileUtils.copyFile(sourceFile, destFile); | |||
| @@ -747,6 +755,8 @@ public class Project { | |||
| * specifying if token filtering must be used. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(File sourceFile, File destFile, boolean filtering) | |||
| throws IOException { | |||
| @@ -759,6 +769,8 @@ public class Project { | |||
| * source files may overwrite newer destination files. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(File sourceFile, File destFile, boolean filtering, | |||
| boolean overwrite) throws IOException { | |||
| @@ -773,6 +785,8 @@ public class Project { | |||
| * to the last modified time of <code>sourceFile</code>. | |||
| * | |||
| * @throws IOException | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void copyFile(File sourceFile, File destFile, boolean filtering, | |||
| boolean overwrite, boolean preserveLastModified) | |||
| @@ -783,6 +797,8 @@ public class Project { | |||
| /** | |||
| * Calls File.setLastModified(long time) in a Java 1.1 compatible way. | |||
| * | |||
| * @deprecated | |||
| */ | |||
| public void setFileLastModified(File file, long time) throws BuildException { | |||
| if (getJavaVersion() == JAVA_1_1) { | |||