bodewig 02/02/15 07:19:18
Modified: . build.xml
src/main/org/apache/tools/ant/types Path.java
Log:
Print a warning if we drop elements from a use supplied path.
Avoid exactly that warning in Ant's own build file.
Revision Changes Path
1.243 +10 -6 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -r1.242 -r1.243
--- build.xml 11 Feb 2002 07:13:48 -0000 1.242
+++ build.xml 15 Feb 2002 15:19:17 -0000 1.243
@@ -66,6 +66,11 @@
<path id="classpath">
</path>
+ <!-- empty for JDK 1.2+, contains classes.zip otherwise -->
+ <path id="classes.zip">
+ <fileset dir="${java.home}" includes="lib/classes.zip" />
+ </path>
+
<path id="tests-classpath">
<pathelement location="${build.classes}" />
<pathelement location="${build.tests}" />
@@ -79,7 +84,7 @@
</path>
<!-- turn this path into a string which is passed to the tests -->
<property name="tests-classpath.value"
- refid="tests-classpath"/>
+ refid="tests-classpath"/>
<!--
===================================================================
@@ -909,12 +914,12 @@
fork="${junit.fork}">
<!-- <jvmarg value="-classic"/> -->
<classpath refid="tests-classpath"/>
+ <classpath refid="classes.zip" />
<sysproperty key="ant.home" value="${ant.home}" />
<sysproperty key="build.tests" value="${build.tests}"/>
- <sysproperty key="java.home" value="${java.home}" />
<sysproperty key="tests-classpath.value"
- value="${tests-classpath.value}" />
+ value="${tests-classpath.value}" />
<formatter type="brief" usefile="false" />
@@ -1001,10 +1006,9 @@
<!-- <jvmarg value="-classic"/> -->
<sysproperty key="ant.home" value="${ant.home}" />
<sysproperty key="build.tests" value="${build.tests}"/>
- <sysproperty key="java.home" value="${java.home}" />
<sysproperty key="tests-classpath.value"
- value="${tests-classpath.value}" />
- <classpath location="${java.home}/lib/classes.zip" />
+ value="${tests-classpath.value}" />
+ <classpath refid="classes.zip" />
<classpath refid="tests-classpath"/>
<formatter type="plain" usefile="false" />
<test name="${testcase}" />
1.30 +5 -2 jakarta-ant/src/main/org/apache/tools/ant/types/Path.java
Index: Path.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Path.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Path.java 10 Feb 2002 20:26:43 -0000 1.29
+++ Path.java 15 Feb 2002 15:19:18 -0000 1.30
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -245,7 +245,10 @@
if (f.exists()) {
setLocation(f);
- }
+ } else {
+ log("dropping " + f + " from path as it doesn't exist",
+ Project.MSG_WARN);
+ }
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>