From: Mathieu Baudier Date: Thu, 4 Jun 2009 17:41:59 +0000 (+0000) Subject: Remove dependencies to ant X-Git-Tag: argeo-slc-2.1.7~1857 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=3bcab27bc2582cf94735dcadd52c84dd84177872;p=gpl%2Fargeo-slc.git Remove dependencies to ant git-svn-id: https://svn.argeo.org/slc/trunk@2469 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/examples/org.argeo.slc.example01/pom.xml b/examples/org.argeo.slc.example01/pom.xml index 2bbd3e32f..866daeddc 100644 --- a/examples/org.argeo.slc.example01/pom.xml +++ b/examples/org.argeo.slc.example01/pom.xml @@ -115,16 +115,18 @@ org.argeo.slc.runtime - org.argeo.slc.support.ant + org.argeo.slc.support.castor org.argeo.slc.runtime - org.argeo.slc.support.castor + org.argeo.slc.support.ws.client org.argeo.slc.runtime - org.argeo.slc.support.ws.client + org.argeo.slc.support.ant + ${project.version} + org.argeo.slc.runtime org.argeo.slc.launcher @@ -134,29 +136,24 @@ javax.activation com.springsource.javax.activation 1.1.1 - testing + test org.argeo.slc.runtime org.argeo.slc.launcher - testing + test org.argeo.slc.runtime org.argeo.slc.support.activemq - testing - - - org.argeo.slc.runtime - org.argeo.slc.support.ant - testing + test org.argeo.slc.runtime org.argeo.slc.support.castor - testing + test diff --git a/runtime/org.argeo.slc.lib.detached/pom.xml b/runtime/org.argeo.slc.lib.detached/pom.xml index a96206dc3..c5cc53b46 100644 --- a/runtime/org.argeo.slc.lib.detached/pom.xml +++ b/runtime/org.argeo.slc.lib.detached/pom.xml @@ -49,10 +49,6 @@ org.argeo.slc.runtime org.argeo.slc.support.simple - - org.argeo.slc.runtime - org.argeo.slc.support.ant - org.argeo.slc.runtime org.argeo.slc.detached diff --git a/runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/ant/detached/SlcDetachedTask.java b/runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/ant/detached/SlcDetachedTask.java deleted file mode 100644 index 3678c170d..000000000 --- a/runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/ant/detached/SlcDetachedTask.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.argeo.slc.ant.detached; - -import java.util.Properties; -import java.util.UUID; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.slc.SlcException; -import org.argeo.slc.ant.spring.MapArg; -import org.argeo.slc.ant.structure.SAwareTask; -import org.argeo.slc.detached.DetachedAnswer; -import org.argeo.slc.detached.DetachedClient; -import org.argeo.slc.detached.DetachedRequest; -import org.argeo.slc.spring.SpringUtils; - -public class SlcDetachedTask extends SAwareTask { - private final static Log log = LogFactory.getLog(SlcDetachedTask.class); - - private String client; - private String action; - - private MapArg properties; - - @Override - protected void executeActions(String mode) { - // Find detached client - DetachedClient detachedClient = null; - if (client != null) - detachedClient = getBean(client); - else - detachedClient = SpringUtils.loadSingleFromContext(getContext(), - DetachedClient.class); - - if (detachedClient == null) - throw new SlcException("Could not find any detached client."); - - // Prepare and send request - DetachedRequest request = new DetachedRequest(UUID.randomUUID() - .toString()); - request.setRef(action); - - if (properties != null) { - Properties props = new Properties(); - props.putAll(properties.getMap()); - request.setProperties(props); - } - - try { - detachedClient.sendRequest(request); - DetachedAnswer answer = detachedClient.receiveAnswer(); - if (answer.getStatus() == DetachedAnswer.ERROR) - throw new SlcException("Error when executing request " - + answer.getUuid() + ": " + answer.getLog()); - else - log.info("Admin answer: " + answer.getLog()); - } catch (Exception e) { - throw new SlcException("Could not send request.", e); - } - } - - public void setClient(String driverBean) { - this.client = driverBean; - } - - public void setAction(String action) { - this.action = action; - } - - public MapArg createProperties() { - if (properties == null) - properties = new MapArg(); - else - throw new SlcException("Properties already declared."); - return properties; - } -} diff --git a/runtime/org.argeo.slc.support.ant/pom.xml b/runtime/org.argeo.slc.support.ant/pom.xml index 909fd1a49..deacdc96c 100644 --- a/runtime/org.argeo.slc.support.ant/pom.xml +++ b/runtime/org.argeo.slc.support.ant/pom.xml @@ -51,6 +51,7 @@ org.argeo.dep.osgi org.argeo.dep.osgi.ant + 1.7.1