[WIP] Upgrade ONOS to karaf version 4.2.1

Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/cli/src/main/java/org/onosproject/cli/net/ResourcesCommand.java b/cli/src/main/java/org/onosproject/cli/net/ResourcesCommand.java
index 1e24cb9..9d57f66 100644
--- a/cli/src/main/java/org/onosproject/cli/net/ResourcesCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/ResourcesCommand.java
@@ -25,9 +25,10 @@
 import java.util.Collections;
 
 import com.google.common.collect.Iterables;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.action.Option;
 import org.onlab.packet.MplsLabel;
 import org.onlab.packet.VlanId;
 import org.onosproject.cli.AbstractShellCommand;
@@ -52,6 +53,7 @@
 /**
  * Lists registered resources.
  */
+@Service
 @Command(scope = "onos", name = "resources",
          description = "Lists registered resources")
 public class ResourcesCommand extends AbstractShellCommand {
@@ -83,7 +85,7 @@
     private ResourceQueryService resourceService;
 
     @Override
-    protected void execute() {
+    protected void doExecute() {
         resourceService = get(ResourceQueryService.class);
 
         if (typeStrings != null) {