]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.agent/src/main/java/org/argeo/slc/cli/DefaultSlcRuntime.java
Introduce runtime selection
[gpl/argeo-slc.git] / org.argeo.slc.agent / src / main / java / org / argeo / slc / cli / DefaultSlcRuntime.java
index ea046bb13e792b8c2bce1ead6307438aa0b6be52..e3ce331529a4af7e53490f7ccc9fabf4e14495cb 100644 (file)
@@ -27,8 +27,9 @@ public class DefaultSlcRuntime {
 
        public final static String SLC_ROOT_FILE_NAME = "slcRoot.properties";
 
-       public SlcExecutionContext executeScript(Resource script,
-                       Properties properties, Map<String, Object> references) {
+       public SlcExecutionContext executeScript(String runtimeStr,
+                       Resource script, String targets, Properties properties,
+                       Map<String, Object> references) {
 
                Resource slcRootFile = findSlcRootFile(script);
                String scriptRelativePath = SpringUtils.extractRelativePath(SpringUtils
@@ -36,8 +37,13 @@ public class DefaultSlcRuntime {
 
                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);
 
                AntSlcApplication application = getApplication(slcRootFile);
                return application.execute(slcExecution, properties, references);