]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/SlcAntConfig.java
New runtime end to end (working)
[gpl/argeo-slc.git] / org.argeo.slc.agent / src / main / java / org / argeo / slc / ant / SlcAntConfig.java
index 9b2824886aca8503e3cc6dba6e73186729691772..4c8981c174765570c8927405a0d51aae7e4cfbc4 100644 (file)
@@ -7,11 +7,11 @@ import java.util.Map;
 import java.util.Properties;\r
 import java.util.StringTokenizer;\r
 \r
-import org.springframework.util.Log4jConfigurer;\r
-\r
 import org.apache.commons.logging.Log;\r
 import org.apache.commons.logging.LogFactory;\r
 import org.apache.tools.ant.Project;\r
+import org.argeo.slc.core.test.WritableTestRun;\r
+import org.springframework.util.Log4jConfigurer;\r
 \r
 /**\r
  * <p>\r
@@ -108,12 +108,6 @@ public class SlcAntConfig {
        // SLC ROOT PROPERTIES\r
        /** Property for the root file (SLC root property file). */\r
        public final static String ROOT_FILE_PROPERTY = "slc.rootFile";\r
-       /** Property for the root dir (SLC root property file). */\r
-       public final static String ROOT_DIR_PROPERTY = "slc.rootDir";\r
-       /** Property for the conf dir (SLC root property file). */\r
-       public final static String CONF_DIR_PROPERTY = "slc.confDir";\r
-       /** Property for the work dir (SLC root property file). */\r
-       public final static String WORK_DIR_PROPERTY = "slc.workDir";\r
        /**\r
         * Comma-separated list of property file names to load from the conf dir and\r
         * add to project user properties\r
@@ -123,9 +117,6 @@ public class SlcAntConfig {
        // SLC CONF PROPERTIES\r
        /** Path to the root Spring application context */\r
        public static String APPLICATION_CONTEXT_PROPERTY = "slc.applicationContext";\r
-       /** Name of the Spring bean used by default */\r
-       public static String DEFAULT_TEST_RUN_PROPERTY = "slc.defaultTestRun";\r
-\r
        // SLC LOCAL PROPERTIES\r
        /** Property for the dir label (SLC local property file). */\r
        public static String DIR_LABEL_PROPERTY = "slc.dirLabel";\r
@@ -162,8 +153,8 @@ public class SlcAntConfig {
                        String key = o.toString();\r
                        // System.out.println(key+"="+all.getProperty(key));\r
                        if (project.getUserProperty(key) == null) {// not already set\r
-                       // if (log.isDebugEnabled())\r
-                       // log.debug(key + "=" + all.getProperty(key));\r
+                               // if (log.isDebugEnabled())\r
+                               // log.debug(key + "=" + all.getProperty(key));\r
                                project.setUserProperty(key, all.getProperty(key));\r
                        }\r
                }\r
@@ -194,30 +185,30 @@ public class SlcAntConfig {
                        final File workDir;\r
                        // Root dir\r
                        final File rootDir = slcRootFile.getParentFile();\r
-                       all.setProperty(ROOT_DIR_PROPERTY, fileUrlPrefix\r
+                       all.setProperty(SlcAntConstants.ROOT_DIR_PROPERTY, fileUrlPrefix\r
                                        + rootDir.getCanonicalPath());\r
 \r
                        // Conf dir\r
-                       if (all.getProperty(CONF_DIR_PROPERTY) == null) {\r
-                               confDir = new File(rootProps.getProperty(CONF_DIR_PROPERTY,\r
+                       if (all.getProperty(SlcAntConstants.CONF_DIR_PROPERTY) == null) {\r
+                               confDir = new File(rootProps.getProperty(SlcAntConstants.CONF_DIR_PROPERTY,\r
                                                rootDir.getAbsolutePath() + "/../conf"))\r
                                                .getCanonicalFile();\r
-                               all.setProperty(CONF_DIR_PROPERTY, fileUrlPrefix\r
+                               all.setProperty(SlcAntConstants.CONF_DIR_PROPERTY, fileUrlPrefix\r
                                                + confDir.getAbsolutePath());\r
                        } else {\r
-                               confDir = new File(all.getProperty(CONF_DIR_PROPERTY))\r
+                               confDir = new File(all.getProperty(SlcAntConstants.CONF_DIR_PROPERTY))\r
                                                .getCanonicalFile();\r
                        }\r
 \r
                        // Work dir\r
-                       if (all.getProperty(WORK_DIR_PROPERTY) == null) {\r
-                               workDir = new File(rootProps.getProperty(WORK_DIR_PROPERTY,\r
+                       if (all.getProperty(SlcAntConstants.WORK_DIR_PROPERTY) == null) {\r
+                               workDir = new File(rootProps.getProperty(SlcAntConstants.WORK_DIR_PROPERTY,\r
                                                rootDir.getAbsolutePath() + "/../work"))\r
                                                .getCanonicalFile();\r
-                               all.setProperty(WORK_DIR_PROPERTY, fileUrlPrefix\r
+                               all.setProperty(SlcAntConstants.WORK_DIR_PROPERTY, fileUrlPrefix\r
                                                + workDir.getAbsolutePath());\r
                        } else {\r
-                               workDir = new File(all.getProperty(WORK_DIR_PROPERTY))\r
+                               workDir = new File(all.getProperty(SlcAntConstants.WORK_DIR_PROPERTY))\r
                                                .getCanonicalFile();\r
                        }\r
 \r
@@ -245,9 +236,8 @@ public class SlcAntConfig {
                                                + "/applicationContext.xml");\r
                        }\r
                        // Default test run\r
-                       if (all.getProperty(DEFAULT_TEST_RUN_PROPERTY) == null) {\r
-                               all.setProperty(DEFAULT_TEST_RUN_PROPERTY,\r
-                                               "defaultTestRun");\r
+                       if (all.getProperty(SlcAntConstants.DEFAULT_TEST_RUN_PROPERTY) == null) {\r
+                               all.setProperty(SlcAntConstants.DEFAULT_TEST_RUN_PROPERTY, "defaultTestRun");\r
                        }\r
 \r
                        // Default log4j\r