From 11f6c1a20bbb4a5c8b1b961f7c9870e11781c178 Mon Sep 17 00:00:00 2001
From: Conor MacNeill
(none)
+ +Specifies the sound to be played if the build succeeded.
+Specifies the sound to be played if the build failed.
+ +
+The following attributes may be used on the <success>
+and <fail>
elements:
Attribute | Description | Required |
source | +the path to a sound-file directory, or the name of a +specific sound-file, to be played. + | +Yes | +
loops | the number of extra times to play the sound-file; @@ -40,26 +59,14 @@ directory you specify. | No |
-To specify the sound-files or the sound-file directories, use the
-nested <success>
and <fail>
-elements:
--<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. --
<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> diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java index b5f090a3a..16ead587e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java @@ -327,6 +327,7 @@ public class Depend extends MatchingTask { // 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,14 +511,19 @@ public class Depend extends MatchingTask { String className = (String)e.nextElement(); if (!outOfDateClasses.containsKey(className)) { ClassFileInfo info = (ClassFileInfo)classFileInfoMap.get(className); - Hashtable dependencies = (Hashtable)classpathDependencies.get(className); - for (Enumeration e2 = dependencies.elements(); e2.hasMoreElements();) { - File classpathFile = (File)e2.nextElement(); - if (classpathFile.lastModified() > info.absoluteFile.lastModified()) { - log("Class " + 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(); + if (classpathFile.lastModified() > info.absoluteFile.lastModified()) { + log("Class " + className + " is out of date with respect to " + classpathFile, Project.MSG_DEBUG); - outOfDateClasses.put(className, className); - break; + outOfDateClasses.put(className, className); + break; + } } } }