diff --git a/WHATSNEW b/WHATSNEW index 34d855d68..130a9df71 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -26,6 +26,8 @@ Other changes: the language jars to be specified in the build script. Bugzilla report 29676. * trim the driver attribute on the task. Bugzilla report 21228. +* Allow (jar) files as well as directories to be given to jdepend. + Bugzilla report 28865. Changes from Ant 1.6.5 to Ant 1.7.0Beta1 ======================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java index b3d35ffdf..41e96adf0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java @@ -473,18 +473,17 @@ public class JDependTask extends Task { if (getClassespath() != null) { // This is the new, better way - use classespath instead // of sourcespath. The code is currently the same - you - // need class files in a directory to use this - jar files - // coming soon.... + // need class files in a directory to use this or jar files. String[] cP = getClassespath().list(); for (int i = 0; i < cP.length; i++) { File f = new File(cP[i]); // not necessary as JDepend would fail, but why loose // some time? - if (!f.exists() || !f.isDirectory()) { + if (!f.exists()) { String msg = "\"" + f.getPath() + "\" does not represent a valid" - + " directory. JDepend would fail."; + + " file or directory. JDepend would fail."; log(msg); throw new BuildException(msg); }