- SlcExecution slcExecution = createSlcExecution();
- slcExecution.setStatus(SlcExecution.STATUS_RUNNING);
- slcExecution.getAttributes().put(SlcAntConstants.EXECATTR_RUNTIME,
- runtimeStr);
- slcExecution.getAttributes().put(SlcAntConstants.EXECATTR_ANT_FILE,
- scriptRelativePath);
- if (targets != null)
- slcExecution.getAttributes().put(
- SlcAntConstants.EXECATTR_ANT_TARGETS, targets);
+ public void executeScript(String runtime, String script, String targets,
+ Properties properties, Map<String, Object> references,
+ SlcExecutionOutput<AntExecutionContext> executionOutput) {
+
+ Resource scriptRes = findScript(script);
+ Resource slcRootFile = findSlcRootFile(scriptRes);
+ if (slcRootFile == null)
+ throw new SlcException(
+ "Could not find any SLC root file, "
+ + "please configure one at the root of your scripts hierarchy.");
+
+ SlcExecution slcExecution = createSlcExecution(runtime, slcRootFile,
+ scriptRes, targets);