+ value = res.getFile().getCanonicalPath();
+ } catch (IOException e) {
+ value = res.getURL().toString();
+ }
+ System.setProperty(key, value);
+ }
+
+ protected ConfigurableApplicationContext createExecutionContext(
+ SlcExecution slcExecution) {
+ try {
+
+ // Find runtime definition
+ Resource runtimeRes = null;
+ String runtimeStr = slcExecution.getAttributes().get(
+ AntConstants.EXECATTR_RUNTIME);
+ if (runtimeStr == null)
+ runtimeStr = System.getProperty(AntConstants.RUNTIME_PROPERTY,
+ "default");
+
+ ResourceLoader rl = new DefaultResourceLoader(getClass()
+ .getClassLoader());
+ try {// tries absolute reference
+ runtimeRes = rl.getResource(runtimeStr);
+ } catch (Exception e) {
+ // silent
+ }
+ if (runtimeRes == null || !runtimeRes.exists()) {
+ if (confDir != null)
+ runtimeRes = confDir.createRelative("runtime/" + runtimeStr
+ + ".xml");
+ }
+
+ // Find runtime independent application context definition