]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java
Improve unit tests
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / ant / AntRegistryUtil.java
index 872dd9cc1bd17432ff2b1ae076817810ce63e1d0..c73b59015303edc6b11383463891e0c341d4401c 100644 (file)
@@ -36,7 +36,8 @@ public class AntRegistryUtil {
        }\r
 \r
        /** Executes only the active paths of the Ant file. */\r
-       public static void runActive(File antFile, List<StructurePath> activePaths) {\r
+       public static Project runActive(File antFile,\r
+                       List<StructurePath> activePaths) {\r
                if (log.isDebugEnabled())\r
                        log.debug("Runs the " + activePaths.size()\r
                                        + " provided active paths of Ant file " + antFile);\r
@@ -53,10 +54,11 @@ public class AntRegistryUtil {
                registry.setMode(StructureRegistry.ACTIVE);\r
                registry.setActivePaths(activePaths);\r
                p.executeTarget(p.getDefaultTarget());\r
+               return p;\r
        }\r
 \r
        /** Executes all paths of the default target of the Ant file. */\r
-       public static void runAll(File antFile) {\r
+       public static Project runAll(File antFile) {\r
                if (log.isDebugEnabled())\r
                        log.debug("Runs all paths of Ant file " + antFile);\r
                Project p = new Project();\r
@@ -67,5 +69,6 @@ public class AntRegistryUtil {
                p.addReference("ant.projectHelper", helper);\r
                helper.parse(p, antFile);\r
                p.executeTarget(p.getDefaultTarget());\r
+               return p;\r
        }\r
 }\r