]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.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 / SlcAntConfig.java
index 2487b20eafec7467836010ad266d817eebb0cab0..124aa0d216744d5fadb345dd3fe1583904ffb0c3 100644 (file)
@@ -6,6 +6,8 @@ import java.io.IOException;
 import java.util.Properties;\r
 import java.util.StringTokenizer;\r
 \r
+import org.springframework.util.Log4jConfigurer;\r
+\r
 import org.apache.tools.ant.Project;\r
 \r
 /** Load reference to directories from an slcRoot.properties file */\r
@@ -95,7 +97,7 @@ public class SlcAntConfig {
                                        PROPERTY_FILE_NAMES_PROPERTY, "slc.properties"), ",");\r
                        while (st.hasMoreTokens()) {\r
                                String fileName = st.nextToken();\r
-                               properties.putAll(loadFile(confDir.getAbsolutePath() + "/"\r
+                               properties.putAll(loadFile(confDir.getAbsolutePath() + File.separator\r
                                                + fileName));\r
                        }\r
 \r
@@ -117,6 +119,17 @@ public class SlcAntConfig {
                                all.setProperty(DEFAULT_TEST_RUN_PROPERTY, "defaultTestRun");\r
                        }\r
 \r
+                       // Default log4j\r
+                       if (all.getProperty("log4j.configuration") == null) {\r
+                               System.setProperty("log4j.configuration",confDir\r
+                                               .getCanonicalPath()\r
+                                               + File.separator + "log4j.properties" );\r
+                               // TODO: fix dependency to log4j\r
+                               Log4jConfigurer.initLogging(confDir\r
+                                               .getCanonicalPath()\r
+                                               + File.separator + "log4j.properties");\r
+                       }\r
+\r
                        return all;\r
                } catch (Exception e) {\r
                        throw new SlcAntException("Unexpected exception while configuring",\r