Hi,

I've created an Ace client to use from my ci environment, as the client
exits after each script I don't need the web client and jetty for this. But
after removing those I'd loose the "coll" commands the gogo shell.

Is there a reason that the ColllectionCommands is included in
org.apache.ace.rest instead of org.apache.ace.gogo?

I've tried to move the CollectionCommands and didn't see any issues in
that, I've attached the patch in case you think this is a good move.

Thanks!

Bram
Index: org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java
===================================================================
--- org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java    
(revision 1576305)
+++ org.apache.ace.client.rest/src/org/apache/ace/client/rest/Activator.java    
(working copy)
@@ -18,14 +18,11 @@
  */
 package org.apache.ace.client.rest;
 
-import java.util.Properties;
-
 import javax.servlet.Servlet;
 
 import org.apache.ace.client.workspace.WorkspaceManager;
 import org.apache.felix.dm.DependencyActivatorBase;
 import org.apache.felix.dm.DependencyManager;
-import org.apache.felix.service.command.CommandProcessor;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
@@ -50,14 +47,6 @@
                 .setRequired(false)
             )
         );
-
-        Properties listProps = new Properties();
-        listProps.put(CommandProcessor.COMMAND_SCOPE, "coll");
-        listProps.put(CommandProcessor.COMMAND_FUNCTION, new String[] { 
"first", "rest" });
-        manager.add(createComponent()
-            .setInterface(Object.class.getName(), listProps)
-            .setImplementation(CollectionCommands.class)
-        );
     }
 
     @Override
Index: org.apache.ace.gogo/bnd.bnd
===================================================================
--- org.apache.ace.gogo/bnd.bnd (revision 1576305)
+++ org.apache.ace.gogo/bnd.bnd (working copy)
@@ -77,5 +77,6 @@
        org.osgi.impl.bundle.obr.*;-split-package:=merge-last,\
        org.xmlpull.v1;-split-package:=first,\
        org.kxml2.io;-split-package:=first,\
-       org.apache.ace.gogo.log
+       org.apache.ace.gogo.log,\
+       org.apache.ace.gogo.collection
        
\ No newline at end of file
Index: org.apache.ace.gogo/src/org/apache/ace/gogo/Activator.java
===================================================================
--- org.apache.ace.gogo/src/org/apache/ace/gogo/Activator.java  (revision 
1576305)
+++ org.apache.ace.gogo/src/org/apache/ace/gogo/Activator.java  (working copy)
@@ -20,6 +20,7 @@
 
 import java.util.Properties;
 
+import org.apache.ace.gogo.collection.CollectionCommands;
 import org.apache.ace.gogo.execute.ExecuteCommands;
 import org.apache.ace.gogo.execute.ScriptExecutor;
 import org.apache.ace.gogo.log.LogCommands;
@@ -72,6 +73,11 @@
                 .setService(LogStore.class)
                 .setRequired(true)));
 
+        manager.add(createComponent()
+            .setInterface(Object.class.getName(), 
createProps(CollectionCommands.SCOPE, CollectionCommands.FUNCTIONS))
+            .setImplementation(CollectionCommands.class)
+        );
+        
         String script = System.getProperty("ace.gogo.script");
         if (script != null) {
             long delay = Long.getLong("ace.gogo.script.delay", 300L);

Reply via email to