Remove dependencies to ant
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 4 Jun 2009 17:41:59 +0000 (17:41 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 4 Jun 2009 17:41:59 +0000 (17:41 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2469 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

examples/org.argeo.slc.example01/pom.xml
runtime/org.argeo.slc.lib.detached/pom.xml
runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/ant/detached/SlcDetachedTask.java [deleted file]
runtime/org.argeo.slc.support.ant/pom.xml

index 2bbd3e32f9d677732b7c10174e827424fd7cb37f..866daeddc8aa8783cb64be21dd60947f2b6164b1 100644 (file)
                </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.ant</artifactId>
+                       <artifactId>org.argeo.slc.support.castor</artifactId>
                </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.castor</artifactId>
+                       <artifactId>org.argeo.slc.support.ws.client</artifactId>
                </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.ws.client</artifactId>
+                       <artifactId>org.argeo.slc.support.ant</artifactId>
+                       <version>${project.version}</version>
                </dependency>
+
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.launcher</artifactId>
                        <groupId>javax.activation</groupId>
                        <artifactId>com.springsource.javax.activation</artifactId>
                        <version>1.1.1</version>
-                       <scope>testing</scope>
+                       <scope>test</scope>
                </dependency>
 
                <!-- TESTING -->
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.launcher</artifactId>
-                       <scope>testing</scope>
+                       <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.support.activemq</artifactId>
-                       <scope>testing</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.ant</artifactId>
-                       <scope>testing</scope>
+                       <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.support.castor</artifactId>
-                       <scope>testing</scope>
+                       <scope>test</scope>
                </dependency>
 
        </dependencies>
index a96206dc39ad6aa4c953123ac7496cb6f18a3c86..c5cc53b467718b6bebafb193b2208914a20a0978 100644 (file)
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.support.simple</artifactId>
                </dependency>
-               <dependency>
-                       <groupId>org.argeo.slc.runtime</groupId>
-                       <artifactId>org.argeo.slc.support.ant</artifactId>
-               </dependency>
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.detached</artifactId>
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 (file)
index 3678c17..0000000
+++ /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;
-       }
-}
index 909fd1a49384fb4ade0bb182025f3de8529046a4..deacdc96c94baccf5264ffbafbe2390f1f147d5d 100644 (file)
@@ -51,6 +51,7 @@
                <dependency>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>org.argeo.dep.osgi.ant</artifactId>
+                       <version>1.7.1</version>
                </dependency>
 
                <dependency>