X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fant%2FAntRegistryUtil.java;h=7b827935b02d94b558f7f7fafea230e190e985a6;hb=a29c28266fef35c1620f6582ec182bad7f7f85ae;hp=d257f55b2650f0309972b5240bcbe3d233d282db;hpb=d62a44995fa4bc758ab3b3e6e7ffe7b79c8684ef;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java b/org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java index d257f55b2..7b827935b 100644 --- a/org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java +++ b/org.argeo.slc/src/main/java/org/argeo/slc/ant/AntRegistryUtil.java @@ -35,7 +35,7 @@ public class AntRegistryUtil { return registry; } - /** Execute only the active paths of teh Ant files. */ + /** Execute only the active paths of the Ant file. */ public static void runActive(File antFile, List activePaths) { Project p = new Project(); @@ -53,6 +53,18 @@ public class AntRegistryUtil { p.executeTarget(p.getDefaultTarget()); } + /** Execute all paths of the default target of the Ant file. */ + public static void runAll(File antFile) { + Project p = new Project(); + p.setUserProperty("ant.file", antFile.getAbsolutePath()); + p.setBaseDir(antFile.getParentFile()); + p.init(); + ProjectHelper helper = new SlcProjectHelper(); + p.addReference("ant.projectHelper", helper); + helper.parse(p, antFile); + p.executeTarget(p.getDefaultTarget()); + } + public static void main(String[] args) { File antFile = new File( "C:/dev/workspaces/default/org.argeo.slc/src/test/slc/root/Category1/SubCategory2/build.xml");