- // Execution
- if (mode.equals(Mode.single)) {
- try {
- // DefaultSlcRuntime runtime = new DefaultSlcRuntime();
- // FIXME: inject this more cleanly
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class clss = cl.loadClass("org.argeo.slc.ant.AntSlcRuntime");
- SlcRuntime<? extends SlcExecutionContext> runtime = (SlcRuntime<? extends SlcExecutionContext>) clss
- .newInstance();
- runtime.executeScript(runtimeStr, script, targets, properties,
- null, null);
- // System.exit(0);
- } catch (Exception e) {
- log.error("SLC client terminated with an error: ", e);
- System.exit(1);
- }
+ // Standalone
+ if (type.equals(Type.standalone)) {
+ }
+ // Agent
+ else if (type.equals(Type.agent)) {
+ }
+ // Server
+ else if (type.equals(Type.server)) {
+ SlcServerHttpClientImpl slcServerHttpClient = new SlcServerHttpClientImpl();
+ slcServerHttpClient.setBaseUrl(urlStr);