--- src/org/objectweb/util/ant/MultipleAnt.java.orig 2005-08-29 16:35:06.000000000 -0500 +++ src/org/objectweb/util/ant/MultipleAnt.java 2005-08-29 16:55:31.000000000 -0500 @@ -45,6 +45,14 @@ for (int j = 0; j < dirs.length; j++) { File dir = new File(directory.getAbsolutePath() + File.separator + dirs[j]); log("Directory=" + dir.getAbsolutePath(), Project.MSG_DEBUG); + log("antFile=" + antFile, Project.MSG_DEBUG); + if (!dir.isFile()) { + log("dir is not a File", Project.MSG_DEBUG); + } else if (!dir.getName().endsWith(".xml")) { + log("dir is not XML", Project.MSG_DEBUG); + } else { + log("dir is XML", Project.MSG_DEBUG); + } if (antFile != null) { // A file name has been specified by the user @@ -59,6 +67,23 @@ super.execute(); } } + else if (dir.isFile() && + dir.getName().endsWith(".xml")) + { + fileName = dir.getAbsolutePath(); + log("execute=" + fileName, Project.MSG_VERBOSE); + super.setAntfile(fileName); + if (target != null) { + super.setTarget(target); + } + try { + super.execute(); + } + catch (Exception e) { + log("Error in " + fileName + " file:\n\t" + e.getMessage(), + Project.MSG_VERBOSE); + } + } else { // No file name has been specified by the user // then try with all