diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/AddUrlCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/AddUrlCommand.java
index e1ac172..00c8b03 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/AddUrlCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/AddUrlCommand.java
@@ -19,7 +19,7 @@
 import java.net.URL;
 import java.util.List;
 
-import org.osgi.service.obr.RepositoryAdmin;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/DeployCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/DeployCommand.java
index c2bf6e3..b29b8c2 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/DeployCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/DeployCommand.java
@@ -18,7 +18,7 @@
 
 import java.util.List;
 
-import org.osgi.service.obr.RepositoryAdmin;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/FindCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/FindCommand.java
index 3de0a6e..f6098f0 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/FindCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/FindCommand.java
@@ -19,15 +19,15 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.Capability;
+import org.apache.felix.bundlerepository.Repository;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Requirement;
+import org.apache.felix.bundlerepository.Resource;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.Version;
-import org.osgi.service.obr.Capability;
-import org.osgi.service.obr.Repository;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Requirement;
-import org.osgi.service.obr.Resource;
 
 @Command(scope = "obr", name = "find", description = "Find OBR bundles for a given filter")
 public class FindCommand extends ObrCommandSupport {
@@ -62,25 +62,4 @@
         }
     }
 
-    private Requirement parseRequirement(RepositoryAdmin admin, String req) throws InvalidSyntaxException {
-        int p = req.indexOf(':');
-        String name;
-        String filter;
-        if (p > 0) {
-            name = req.substring(0, p);
-            filter = req.substring(p + 1);
-        } else {
-            if (req.contains("package")) {
-                name = "package";
-            } else {
-                name = "bundle";
-            }
-            filter = req;
-        }
-        if (!filter.startsWith("(")) {
-            filter = "(" + filter + ")";
-        }
-        return admin.requirement(name, filter);
-    }
-
 }
\ No newline at end of file
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/InfoCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/InfoCommand.java
index e66a65f..c3950ed 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/InfoCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/InfoCommand.java
@@ -22,12 +22,12 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.felix.bundlerepository.Capability;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Requirement;
+import org.apache.felix.bundlerepository.Resource;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
-import org.osgi.service.obr.Capability;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Requirement;
-import org.osgi.service.obr.Resource;
 
 @Command(scope = "obr", name = "info", description = "Prints information about OBR bundles")
 public class InfoCommand extends ObrCommandSupport {
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListCommand.java
index b2e1185..bb76b86 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListCommand.java
@@ -18,9 +18,9 @@
 
 import java.util.List;
 
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Resource;
 import org.osgi.framework.Version;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Resource;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListUrlCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListUrlCommand.java
index e66c9e8..7c74663 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListUrlCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ListUrlCommand.java
@@ -16,8 +16,8 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
-import org.osgi.service.obr.Repository;
-import org.osgi.service.obr.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Repository;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Command;
 
 @Command(scope = "obr", name = "listUrl", description = "Displays the repository URLs currently associated with the OBR service.")
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ObrCommandSupport.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ObrCommandSupport.java
index 80ec89e..eb59dc3 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ObrCommandSupport.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ObrCommandSupport.java
@@ -19,14 +19,15 @@
 import java.io.PrintStream;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Requirement;
+import org.apache.felix.bundlerepository.Resolver;
+import org.apache.felix.bundlerepository.Resource;
 import org.apache.felix.karaf.shell.console.OsgiCommandSupport;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.Version;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Requirement;
-import org.osgi.service.obr.Resolver;
-import org.osgi.service.obr.Resource;
 
 public abstract class ObrCommandSupport extends OsgiCommandSupport {
 
@@ -218,4 +219,37 @@
         }
 
     }
+
+
+    protected Requirement parseRequirement(RepositoryAdmin admin, String req) throws InvalidSyntaxException {
+        int p = req.indexOf(':');
+        String name;
+        String filter;
+        if (p > 0) {
+            name = req.substring(0, p);
+            filter = req.substring(p + 1);
+        } else {
+            if (req.contains("package")) {
+                name = "package";
+            } else if (req.contains("service")) {
+                name = "service";
+            } else {
+                name = "bundle";
+            }
+            filter = req;
+        }
+        if (!filter.startsWith("(")) {
+            filter = "(" + filter + ")";
+        }
+        return admin.requirement(name, filter);
+    }
+
+    protected Requirement[] parseRequirements(RepositoryAdmin admin, List<String> requirements) throws InvalidSyntaxException {
+        Requirement[] reqs = new Requirement[requirements.size()];
+        for (int i = 0; i < reqs.length; i++) {
+            reqs[i] = parseRequirement(admin, requirements.get(i));
+        }
+        return reqs;
+    }
+
 }
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
index 888d6f8..f55f5b1 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RefreshUrlCommand.java
@@ -19,8 +19,8 @@
 import java.net.URL;
 import java.util.List;
 
-import org.osgi.service.obr.Repository;
-import org.osgi.service.obr.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Repository;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RemoveUrlCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RemoveUrlCommand.java
index 452a6da..123de1d 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RemoveUrlCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/RemoveUrlCommand.java
@@ -19,9 +19,9 @@
 import java.net.URL;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
-import org.osgi.service.obr.RepositoryAdmin;
 
 @Command(scope = "obr", name = "removeUrl", description = "Removes a list of repository URLs from the OBR service.")
 public class RemoveUrlCommand extends ObrCommandSupport {
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ResolveCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ResolveCommand.java
index fe5929d..8b73a90 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ResolveCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/ResolveCommand.java
@@ -16,44 +16,75 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.Repository;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Requirement;
+import org.apache.felix.bundlerepository.Resolver;
+import org.apache.felix.bundlerepository.Resource;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 import org.apache.felix.gogo.commands.Option;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Requirement;
-import org.osgi.service.obr.Resolver;
-import org.osgi.service.obr.Resource;
 
 @Command(scope = "obr", name = "resolve", description = "Show the resolution output for a given set of requirements")
 public class ResolveCommand extends ObrCommandSupport {
 
-    @Option(name = "-w", aliases = "--why", description = "Display the reason if the inclusion of the resource")
+    @Option(name = "-w", aliases = "--why", description = "Display the reason of the inclusion of the resource")
     boolean why;
 
+    @Option(name = "-l", aliases = "--no-local", description = "Ignore local resources during resolution")
+    boolean noLocal;
+
+    @Option(name = "--no-remote", description = "Ignore remote resources during resolution")
+    boolean noRemote;
+
+    @Option(name = "--deploy", description = "Deploy the selected bundles")
+    boolean deploy;
+
+    @Option(name = "--start", description = "Deploy and start the selected bundles")
+    boolean start;
+
+    @Option(name = "--optional", description = "Resolve optional dependencies")
+    boolean optional;
+
     @Argument(index = 0, name = "requirements", description = "Requirements", required = true, multiValued = true)
     List<String> requirements;
 
     protected void doExecute(RepositoryAdmin admin) throws Exception {
-        Resolver resolver = admin.resolver();
-        for (Requirement requirement : getRequirements(admin)) {
+        List<Repository> repositories = new ArrayList<Repository>();
+        repositories.add(admin.getSystemRepository());
+        if (!noLocal) {
+            repositories.add(admin.getLocalRepository());
+        }
+        if (!noRemote) {
+            repositories.addAll(Arrays.asList(admin.listRepositories()));
+        }
+        Resolver resolver = admin.resolver(repositories.toArray(new Repository[repositories.size()]));
+        for (Requirement requirement : parseRequirements(admin, requirements)) {
             resolver.add(requirement);
         }
-        if (resolver.resolve()) {
+        if (resolver.resolve(optional ? 0 : Resolver.NO_OPTIONAL_REQUIREMENTS)) {
             Resource[] resources;
             resources = resolver.getRequiredResources();
             if ((resources != null) && (resources.length > 0)) {
                 System.out.println("Required resource(s):");
                 printUnderline(System.out, 21);
                 for (int resIdx = 0; resIdx < resources.length; resIdx++) {
-                    System.out.println("   " + resources[resIdx].getPresentationName()
-                        + " (" + resources[resIdx].getVersion() + ")");
+                    System.out.println("   " + resources[resIdx].getPresentationName() + " (" + resources[resIdx].getVersion() + ")");
                     if (why) {
-                        Requirement[] r = resolver.getReason(resources[resIdx]);
-                        for (int reqIdx = 0; r != null && reqIdx < r.length; reqIdx++) {
-                            System.out.println("      - " + r[reqIdx].getName() + ":" + r[reqIdx].getFilter());
+                        Requirement[] req = resolver.getReason(resources[resIdx]);
+                        for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
+                            if (!req[reqIdx].isOptional()) {
+                                Resource r = req[reqIdx].getResource();
+                                if (r != null) {
+                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                } else {
+                                    System.out.println("      - " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                }
+                            }
                         }
                     }
                 }
@@ -67,13 +98,32 @@
                     System.out.println("   " + resources[resIdx].getPresentationName()
                         + " (" + resources[resIdx].getVersion() + ")");
                     if (why) {
-                        Requirement[] r = resolver.getReason(resources[resIdx]);
-                        for (int reqIdx = 0; r != null && reqIdx < r.length; reqIdx++) {
-                            System.out.println("      - " + r[reqIdx].getName() + ":" + r[reqIdx].getFilter());
+                        Requirement[] req = resolver.getReason(resources[resIdx]);
+                        for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
+                            if (!req[reqIdx].isOptional()) {
+                                Resource r = req[reqIdx].getResource();
+                                if (r != null) {
+                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                } else {
+                                    System.out.println("      - " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                }
+                            }
                         }
                     }
                 }
             }
+            if (deploy || start) {
+                try
+                {
+                    System.out.print("\nDeploying...");
+                    resolver.deploy(start);
+                    System.out.println("done.");
+                }
+                catch (IllegalStateException ex)
+                {
+                    System.err.println(ex);
+                }
+            }
         } else {
             Requirement[] reqs = resolver.getUnsatisfiedRequirements();
             if ((reqs != null) && (reqs.length > 0)) {
@@ -92,33 +142,4 @@
         }
     }
 
-    private Requirement[] getRequirements(RepositoryAdmin admin) throws InvalidSyntaxException {
-        Requirement[] reqs = new Requirement[requirements.size()];
-        for (int i = 0; i < reqs.length; i++) {
-            reqs[i] = parseRequirement(admin, requirements.get(i));
-        }
-        return reqs;
-    }
-
-    private Requirement parseRequirement(RepositoryAdmin admin, String req) throws InvalidSyntaxException {
-        int p = req.indexOf(':');
-        String name;
-        String filter;
-        if (p > 0) {
-            name = req.substring(0, p);
-            filter = req.substring(p + 1);
-        } else {
-            if (req.contains("package")) {
-                name = "package";
-            } else {
-                name = "bundle";
-            }
-            filter = req;
-        }
-        if (!filter.startsWith("(")) {
-            filter = "(" + filter + ")";
-        }
-        return admin.requirement(name, filter);
-    }
-
 }
\ No newline at end of file
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/SourceCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/SourceCommand.java
index 3e8dcfd..7bc4df4 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/SourceCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/SourceCommand.java
@@ -19,12 +19,12 @@
 import java.net.URL;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Resource;
 import org.apache.felix.gogo.commands.Option;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
 import org.apache.felix.karaf.shell.obr.util.FileUtil;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Resource;
 
 @Command(scope = "obr", name = "source", description = "Download the sources for an OBR bundle.")
 public class SourceCommand extends ObrCommandSupport {
diff --git a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/StartCommand.java b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/StartCommand.java
index 0164846..f662881 100644
--- a/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/StartCommand.java
+++ b/karaf/shell/obr/src/main/java/org/apache/felix/karaf/shell/obr/StartCommand.java
@@ -16,7 +16,7 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
-import org.osgi.service.obr.RepositoryAdmin;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.gogo.commands.Command;
 
 @Command(scope = "obr", name = "start", description = "Deploy and start a list of bundles using OBR.")
