]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java
Revert HSQL DB changes (still force shutdown, but reuse connection)
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / ant / AntRegistryUtil.java
index d257f55b2650f0309972b5240bcbe3d233d282db..7b827935b02d94b558f7f7fafea230e190e985a6 100644 (file)
@@ -35,7 +35,7 @@ public class AntRegistryUtil {
                return registry;\r
        }\r
 \r
-       /** Execute only the active paths of teh Ant files. */\r
+       /** Execute only the active paths of the Ant file. */\r
        public static void runActive(File antFile, List<StructurePath> activePaths) {\r
 \r
                Project p = new Project();\r
@@ -53,6 +53,18 @@ public class AntRegistryUtil {
                p.executeTarget(p.getDefaultTarget());\r
        }\r
 \r
+       /** Execute all paths of the default target of the Ant file. */\r
+       public static void runAll(File antFile) {\r
+               Project p = new Project();\r
+               p.setUserProperty("ant.file", antFile.getAbsolutePath());\r
+               p.setBaseDir(antFile.getParentFile());\r
+               p.init();\r
+               ProjectHelper helper = new SlcProjectHelper();\r
+               p.addReference("ant.projectHelper", helper);\r
+               helper.parse(p, antFile);\r
+               p.executeTarget(p.getDefaultTarget());\r
+       }\r
+\r
        public static void main(String[] args) {\r
                File antFile = new File(\r
                                "C:/dev/workspaces/default/org.argeo.slc/src/test/slc/root/Category1/SubCategory2/build.xml");\r