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
// 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
// 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
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
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
+ "/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