]> source.dussan.org Git - aspectj.git/commitdiff
To support the new testing ICommand wrapper for AjcTask, permit ant.jar in a testing...
authorwisberg <wisberg>
Sat, 24 May 2003 11:12:42 +0000 (11:12 +0000)
committerwisberg <wisberg>
Sat, 24 May 2003 11:12:42 +0000 (11:12 +0000)
This does not affect regular module or product builds.

build/src/org/aspectj/internal/tools/build/Module.java

index a1ce569424c2b7a607b7cc8786eb7f205cea24c2..4233bf1c94168562d87b3df902fd4815b5edc9ef 100644 (file)
@@ -97,7 +97,7 @@ public class Module {
         
         for (Iterator iter = module.getLibJars().iterator(); iter.hasNext();) {
             File libJar = (File) iter.next();
-            if (!skipLibraryJarAntecedant(libJar)
+            if (!skipLibraryJarAntecedant(module, libJar)
                 && !known.contains(libJar)) { // XXX what if same referent, diff path...
                 known.add(libJar);
             }
@@ -113,13 +113,17 @@ public class Module {
         }
     }
     
-    /** XXX gack explicitly skip Ant */
-    private static boolean skipLibraryJarAntecedant(File libJar) {
+    /** XXX gack explicitly skip Ant except for testing... modules */
+    private static boolean skipLibraryJarAntecedant(Module module, File libJar) {
         if (null == libJar) {
             return true;
         }
-        String path = libJar.getPath().replace('\\', '/');
-        return (-1 != path.indexOf("/lib/ant/lib/"));
+        if (!module.name.startsWith("testing")) {
+            String path = libJar.getPath().replace('\\', '/');
+            path = path.replace(File.separatorChar, '/');
+            return (-1 != path.indexOf("/lib/ant/lib/"));
+        }
+        return false;
     }
 
     /** XXX gack explicitly skip runtime */