conor 01/08/05 04:06:53
Modified: . build.xml
src/main/org/apache/tools/ant FileUtils.java
IntrospectionHelper.java Project.java
Log:
Fix bootstrap problems. Two issues. Filtering was always been done
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.
Revision Changes Path
1.169 +10 -6 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- build.xml 2001/08/03 16:38:20 1.168
+++ build.xml 2001/08/05 11:06:53 1.169
@@ -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>
<!--
1.2 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/FileUtils.java
Index: FileUtils.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/FileUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FileUtils.java 2001/08/04 14:37:40 1.1
+++ FileUtils.java 2001/08/05 11:06:53 1.2
@@ -187,7 +187,7 @@
parent.mkdirs();
}
- if (filterSet != null) {
+ if (filterSet != null && filterSet.hasFilters()) {
BufferedReader in = new BufferedReader(new
FileReader(sourceFile));
BufferedWriter out = new BufferedWriter(new
FileWriter(destFile));
1.21 +5 -4
jakarta-ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
Index: IntrospectionHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- IntrospectionHelper.java 2001/08/04 14:30:36 1.20
+++ IntrospectionHelper.java 2001/08/05 11:06:53 1.21
@@ -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 @@
}
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 @@
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) {
1.69 +16 -0 jakarta-ant/src/main/org/apache/tools/ant/Project.java
Index: Project.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- Project.java 2001/08/04 14:37:40 1.68
+++ Project.java 2001/08/05 11:06:53 1.69
@@ -698,6 +698,8 @@
* 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 @@
* 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 @@
* 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 @@
* No filtering is performed.
*
* @throws IOException
+ *
+ * @deprecated
*/
public void copyFile(File sourceFile, File destFile) throws IOException {
FileUtils.copyFile(sourceFile, destFile);
@@ -747,6 +755,8 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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) {