conor 01/10/10 08:30:36
Modified: docs/manual/OptionalTasks sound.html
src/main/org/apache/tools/ant/taskdefs/optional/depend
Depend.java
Log:
Merge across from Ant 1.4.1 changes
Revision Changes Path
1.3 +21 -14 jakarta-ant/docs/manual/OptionalTasks/sound.html
Index: sound.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/sound.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -u -r1.2 -r1.3
--- sound.html 2001/02/13 12:31:56 1.2
+++ sound.html 2001/10/10 15:30:35 1.3
@@ -19,6 +19,18 @@
directory you specify.</p>
<h3>Parameters</h3>
+<p>(none)</p>
+
+<h3>Nested Elements</h3>
+<h4>success</h4>
+<p>Specifies the sound to be played if the build succeeded.</p>
+<h4>fail</h4>
+<p>Specifies the sound to be played if the build failed.</p>
+
+<h3>Nested Element Parameters</h3>
+<p>
+The following attributes may be used on the <code><success></code>
+and <code><fail></code> elements:</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
@@ -26,6 +38,13 @@
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
+ <td valign="top">source</td>
+ <td valign="top">the path to a sound-file directory, or the name of a
+specific sound-file, to be played.
+ </td>
+ <td valign="top" align="center">Yes</td>
+ </tr>
+ <tr>
<td valign="top">loops</td>
<td valign="top">the number of extra times to play the sound-file;
default is <code>0</code>.
@@ -40,26 +59,14 @@
<td valign="top" align="center">No</td>
</tr>
</table>
-<p>
-To specify the sound-files or the sound-file directories, use the
-nested <code><success></code> and <code><fail></code>
-elements:</p>
-<blockquote>
-<pre>
-<success> the path to a sound-file directory, or the name of a
- specific sound-file, to be played if the build succeeded.
-<fail> the path to a sound-file directory, or the name of a
- specific sound-file, to be played if the build succeeded.
-</pre>
-</blockquote>
<h3>Examples</h3>
<blockquote>
<pre>
<target name="fun" if="fun"
unless="fun.done">
- <sound loops="2">
+ <sound>
<success source="${user.home}/sounds/bell.wav"/>
- <fail source="${user.home}/sounds/ohno.wav"/>
+ <fail source="${user.home}/sounds/ohno.wav"
loops="2"/>
</sound>
<property name="fun.done" value="true"/>
</target>
1.12 +13 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
Index: Depend.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -u -r1.11 -r1.12
--- Depend.java 2001/09/30 13:21:54 1.11
+++ Depend.java 2001/10/10 15:30:35 1.12
@@ -327,6 +327,7 @@
// now determine which jars each class depends upon
classpathDependencies = new Hashtable();
AntClassLoader loader = new AntClassLoader(getProject(),
dependClasspath);
+
Hashtable classpathFileCache = new Hashtable();
Object nullFileMarker = new Object();
for (Enumeration e = dependencyMap.keys(); e.hasMoreElements();)
{
@@ -510,6 +511,10 @@
String className = (String)e.nextElement();
if (!outOfDateClasses.containsKey(className)) {
ClassFileInfo info =
(ClassFileInfo)classFileInfoMap.get(className);
+
+ // if we have no info about the class - it may have
been deleted already and we
+ // are using cached info.
+ if (info != null) {
Hashtable dependencies =
(Hashtable)classpathDependencies.get(className);
for (Enumeration e2 = dependencies.elements();
e2.hasMoreElements();) {
File classpathFile = (File)e2.nextElement();
@@ -518,6 +523,7 @@
" is out of date with respect to " +
classpathFile, Project.MSG_DEBUG);
outOfDateClasses.put(className, className);
break;
+ }
}
}
}