X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fant%2FSlcAntConfig.java;fp=org.argeo.slc%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fant%2FSlcAntConfig.java;h=7fedff747840feadd7e1c95ca7b0f4f0cf89118b;hb=d62a44995fa4bc758ab3b3e6e7ffe7b79c8684ef;hp=61c74524c52db399458248eb6ea50d205008ca40;hpb=af47cf1f193f9d9965d9e302e2712712ce623a50;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.java b/org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.java index 61c74524c..7fedff747 100644 --- a/org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.java +++ b/org.argeo.slc/src/main/java/org/argeo/slc/ant/SlcAntConfig.java @@ -24,16 +24,14 @@ public class SlcAntConfig { /** Path to the root Spring application context */ public static String APPLICATION_CONTEXT_PROPERTY = "org.argeo.slc.ant.applicationContext"; - private final File confDir; - private final File rootDir; - private final File workDir; - /** Retrieve all properties and set them as project user properties */ - public SlcAntConfig(Project project, File slcRootFile) { + public static void initProject(Project project, File slcRootFile) { Properties p = loadFile(slcRootFile.getAbsolutePath()); + final File confDir; + final File workDir; // Root dir - rootDir = slcRootFile.getParentFile(); + final File rootDir = slcRootFile.getParentFile(); project.setUserProperty(ROOT_DIR_PROPERTY, rootDir.getAbsolutePath()); // Conf dir @@ -85,7 +83,7 @@ public class SlcAntConfig { } } - private Properties loadFile(String path) { + private static Properties loadFile(String path) { Properties p = new Properties(); try { FileInputStream in = new FileInputStream(path); @@ -97,16 +95,4 @@ public class SlcAntConfig { return p; } - public File getConfDir() { - return confDir; - } - - public File getRootDir() { - return rootDir; - } - - public File getWorkDir() { - return workDir; - } - }