]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.java
Simplify structure framework
[gpl/argeo-slc.git] / org.argeo.slc / src / main / java / org / argeo / slc / ant / SlcAntConfig.java
index 61c74524c52db399458248eb6ea50d205008ca40..7fedff747840feadd7e1c95ca7b0f4f0cf89118b 100644 (file)
@@ -24,16 +24,14 @@ public class SlcAntConfig {
        /** Path to the root Spring application context */\r
        public static String APPLICATION_CONTEXT_PROPERTY = "org.argeo.slc.ant.applicationContext";\r
 \r
-       private final File confDir;\r
-       private final File rootDir;\r
-       private final File workDir;\r
-\r
        /** Retrieve all properties and set them as project user properties */\r
-       public SlcAntConfig(Project project, File slcRootFile) {\r
+       public static void initProject(Project project, File slcRootFile) {\r
                Properties p = loadFile(slcRootFile.getAbsolutePath());\r
 \r
+               final File confDir;\r
+               final File workDir;\r
                // Root dir\r
-               rootDir = slcRootFile.getParentFile();\r
+               final File rootDir = slcRootFile.getParentFile();\r
                project.setUserProperty(ROOT_DIR_PROPERTY, rootDir.getAbsolutePath());\r
 \r
                // Conf dir\r
@@ -85,7 +83,7 @@ public class SlcAntConfig {
                }\r
        }\r
 \r
-       private Properties loadFile(String path) {\r
+       private static Properties loadFile(String path) {\r
                Properties p = new Properties();\r
                try {\r
                        FileInputStream in = new FileInputStream(path);\r
@@ -97,16 +95,4 @@ public class SlcAntConfig {
                return p;\r
        }\r
 \r
-       public File getConfDir() {\r
-               return confDir;\r
-       }\r
-\r
-       public File getRootDir() {\r
-               return rootDir;\r
-       }\r
-\r
-       public File getWorkDir() {\r
-               return workDir;\r
-       }\r
-\r
 }\r