import org.apache.commons.logging.LogFactory;\r
import org.apache.tools.ant.BuildException;\r
import org.apache.tools.ant.Project;\r
-import org.apache.tools.ant.helper.ProjectHelperImpl;\r
+import org.apache.tools.ant.helper.ProjectHelper2;\r
\r
import org.argeo.slc.core.UnsupportedException;\r
import org.argeo.slc.core.structure.DefaultSRegistry;\r
* Custom implementation of an Ant <code>ProjectHelper</code> binding a Spring\r
* application context and a structure registry with the Ant project.\r
*/\r
-public class SlcProjectHelper extends ProjectHelperImpl {\r
+public class SlcProjectHelper extends ProjectHelper2 {\r
private static Log log;\r
\r
/** The Ant reference to the Spring application context used. */\r
System.getProperties().putAll((Map<?, ?>) project.getProperties());\r
String acPath = project\r
.getUserProperty(SlcAntConfig.APPLICATION_CONTEXT_PROPERTY);\r
+ if (log.isDebugEnabled())\r
+ log.debug("Loading Spring application context from " + acPath);\r
+ // FIXME: workaround to the removal of leading '/' by Spring\r
+ // use URL instead?\r
AbstractApplicationContext context = new FileSystemXmlApplicationContext(\r
- acPath);\r
+ '/'+acPath);\r
context.registerShutdownHook();\r
project.addReference(REF_ROOT_CONTEXT, context);\r
}\r