X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.agent%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fant%2FSlcAntConfig.java;h=61b78cc7cd4207a7b7c41e4559a22bf1de5ce827;hb=0bc20690292697d0c7950ccd8c3e1e0887d8b88a;hp=a68f210262fceda4464e36d5c8660c8c730f130a;hpb=847af36ba908ea3285a16e17d809a2b29f207b0a;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/SlcAntConfig.java b/org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/SlcAntConfig.java index a68f21026..61b78cc7c 100644 --- a/org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/SlcAntConfig.java +++ b/org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/SlcAntConfig.java @@ -108,12 +108,6 @@ public class SlcAntConfig { // SLC ROOT PROPERTIES /** Property for the root file (SLC root property file). */ public final static String ROOT_FILE_PROPERTY = "slc.rootFile"; - /** Property for the root dir (SLC root property file). */ - public final static String ROOT_DIR_PROPERTY = "slc.rootDir"; - /** Property for the conf dir (SLC root property file). */ - public final static String CONF_DIR_PROPERTY = "slc.confDir"; - /** Property for the work dir (SLC root property file). */ - public final static String WORK_DIR_PROPERTY = "slc.workDir"; /** * Comma-separated list of property file names to load from the conf dir and * add to project user properties @@ -162,8 +156,8 @@ public class SlcAntConfig { String key = o.toString(); // System.out.println(key+"="+all.getProperty(key)); if (project.getUserProperty(key) == null) {// not already set - // if (log.isDebugEnabled()) - // log.debug(key + "=" + all.getProperty(key)); + // if (log.isDebugEnabled()) + // log.debug(key + "=" + all.getProperty(key)); project.setUserProperty(key, all.getProperty(key)); } } @@ -194,30 +188,30 @@ public class SlcAntConfig { final File workDir; // Root dir final File rootDir = slcRootFile.getParentFile(); - all.setProperty(ROOT_DIR_PROPERTY, fileUrlPrefix + all.setProperty(SlcAntConstants.ROOT_DIR_PROPERTY, fileUrlPrefix + rootDir.getCanonicalPath()); // Conf dir - if (all.getProperty(CONF_DIR_PROPERTY) == null) { - confDir = new File(rootProps.getProperty(CONF_DIR_PROPERTY, + if (all.getProperty(SlcAntConstants.CONF_DIR_PROPERTY) == null) { + confDir = new File(rootProps.getProperty(SlcAntConstants.CONF_DIR_PROPERTY, rootDir.getAbsolutePath() + "/../conf")) .getCanonicalFile(); - all.setProperty(CONF_DIR_PROPERTY, fileUrlPrefix + all.setProperty(SlcAntConstants.CONF_DIR_PROPERTY, fileUrlPrefix + confDir.getAbsolutePath()); } else { - confDir = new File(all.getProperty(CONF_DIR_PROPERTY)) + confDir = new File(all.getProperty(SlcAntConstants.CONF_DIR_PROPERTY)) .getCanonicalFile(); } // Work dir - if (all.getProperty(WORK_DIR_PROPERTY) == null) { - workDir = new File(rootProps.getProperty(WORK_DIR_PROPERTY, + if (all.getProperty(SlcAntConstants.WORK_DIR_PROPERTY) == null) { + workDir = new File(rootProps.getProperty(SlcAntConstants.WORK_DIR_PROPERTY, rootDir.getAbsolutePath() + "/../work")) .getCanonicalFile(); - all.setProperty(WORK_DIR_PROPERTY, fileUrlPrefix + all.setProperty(SlcAntConstants.WORK_DIR_PROPERTY, fileUrlPrefix + workDir.getAbsolutePath()); } else { - workDir = new File(all.getProperty(WORK_DIR_PROPERTY)) + workDir = new File(all.getProperty(SlcAntConstants.WORK_DIR_PROPERTY)) .getCanonicalFile(); } @@ -246,8 +240,7 @@ public class SlcAntConfig { } // Default test run if (all.getProperty(DEFAULT_TEST_RUN_PROPERTY) == null) { - all.setProperty(DEFAULT_TEST_RUN_PROPERTY, - "defaultTestRun"); + all.setProperty(DEFAULT_TEST_RUN_PROPERTY, "defaultTestRun"); } // Default log4j