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 00c8b03..3ccb1fe 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
@@ -16,7 +16,6 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
-import java.net.URL;
 import java.util.List;
 
 import org.apache.felix.bundlerepository.RepositoryAdmin;
@@ -31,7 +30,7 @@
 
     protected void doExecute(RepositoryAdmin admin) throws Exception {
         for (String url : urls) {
-            admin.addRepository(new URL(url));
+            admin.addRepository(url);
         }
     }
 }
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 7c74663..6dc9487 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
@@ -27,7 +27,7 @@
         Repository[] repos = admin.listRepositories();
         if ((repos != null) && (repos.length > 0)) {
             for (int i = 0; i < repos.length; i++) {
-                System.out.println(repos[i].getURL());
+                System.out.println(repos[i].getURI());
             }
         } else {
             System.out.println("No repository URLs are set.");
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 eb59dc3..bed4a73 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,6 +19,7 @@
 import java.io.PrintStream;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.Reason;
 import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.bundlerepository.Requirement;
 import org.apache.felix.bundlerepository.Resolver;
@@ -57,7 +58,7 @@
 
     protected abstract void doExecute(RepositoryAdmin admin) throws Exception;
 
-    protected Resource[] searchRepository(RepositoryAdmin admin, String targetId, String targetVersion)
+    protected Resource[] searchRepository(RepositoryAdmin admin, String targetId, String targetVersion) throws InvalidSyntaxException
     {
         // Try to see if the targetId is a bundle ID.
         try
@@ -186,7 +187,7 @@
                 try
                 {
                     System.out.print("\nDeploying...");
-                    resolver.deploy(start);
+                    resolver.deploy(start ? Resolver.START : 0);
                     System.out.println("done.");
                 }
                 catch (IllegalStateException ex)
@@ -196,19 +197,15 @@
             }
             else
             {
-                Requirement[] reqs = resolver.getUnsatisfiedRequirements();
+                Reason[] reqs = resolver.getUnsatisfiedRequirements();
                 if ((reqs != null) && (reqs.length > 0))
                 {
                     System.out.println("Unsatisfied requirement(s):");
                     printUnderline(System.out, 27);
                     for (int reqIdx = 0; reqIdx < reqs.length; reqIdx++)
                     {
-                        System.out.println("   " + reqs[reqIdx].getFilter());
-                        Resource[] resources = resolver.getResources(reqs[reqIdx]);
-                        for (int resIdx = 0; resIdx < resources.length; resIdx++)
-                        {
-                            System.out.println("      " + resources[resIdx].getPresentationName());
-                        }
+                        System.out.println("   " + reqs[reqIdx].getRequirement().getFilter());
+                        System.out.println("      " + reqs[reqIdx].getResource().getPresentationName());
                     }
                 }
                 else
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 f55f5b1..7509842 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
@@ -16,7 +16,6 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
-import java.net.URL;
 import java.util.List;
 
 import org.apache.felix.bundlerepository.Repository;
@@ -33,15 +32,13 @@
     protected void doExecute(RepositoryAdmin admin) throws Exception {
 		if (urls != null && !urls.isEmpty()) {
 			for (String url : urls) {
-				admin.removeRepository(new URL(url));
-				admin.addRepository(new URL(url));
+				admin.addRepository(url);
 			}
 		} else {
 			Repository[] repos = admin.listRepositories();
 			if ((repos != null) && (repos.length > 0)) {
 				for (int i = 0; i < repos.length; i++) {
-					admin.removeRepository(repos[i].getURL());
-					admin.addRepository(repos[i].getURL());
+					admin.addRepository(repos[i].getURI());
 				}
 			}
 		}
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 123de1d..3ae7e4a 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
@@ -16,7 +16,6 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
-import java.net.URL;
 import java.util.List;
 
 import org.apache.felix.bundlerepository.RepositoryAdmin;
@@ -31,7 +30,7 @@
 
     protected void doExecute(RepositoryAdmin admin) throws Exception {
         for (String url : urls) {
-            admin.removeRepository(new URL(url));
+            admin.removeRepository(url);
         }
     }
 }
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 afe44a2..251f63f 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
@@ -20,6 +20,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.felix.bundlerepository.Reason;
 import org.apache.felix.bundlerepository.Repository;
 import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.apache.felix.bundlerepository.Requirement;
@@ -75,14 +76,14 @@
                 for (int resIdx = 0; resIdx < resources.length; resIdx++) {
                     System.out.println("   " + resources[resIdx].getPresentationName() + " (" + resources[resIdx].getVersion() + ")");
                     if (why) {
-                        Requirement[] req = resolver.getReason(resources[resIdx]);
+                        Reason[] req = resolver.getReason(resources[resIdx]);
                         for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
-                            if (!req[reqIdx].isOptional()) {
+                            if (!req[reqIdx].getRequirement().isOptional()) {
                                 Resource r = req[reqIdx].getResource();
                                 if (r != null) {
-                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
                                 } else {
-                                    System.out.println("      - " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                    System.out.println("      - " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
                                 }
                             }
                         }
@@ -98,14 +99,14 @@
                     System.out.println("   " + resources[resIdx].getPresentationName()
                         + " (" + resources[resIdx].getVersion() + ")");
                     if (why) {
-                        Requirement[] req = resolver.getReason(resources[resIdx]);
+                        Reason[] req = resolver.getReason(resources[resIdx]);
                         for (int reqIdx = 0; req != null && reqIdx < req.length; reqIdx++) {
-                            if (!req[reqIdx].isOptional()) {
+                            if (!req[reqIdx].getRequirement().isOptional()) {
                                 Resource r = req[reqIdx].getResource();
                                 if (r != null) {
-                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                    System.out.println("      - " + r.getPresentationName() + " / " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
                                 } else {
-                                    System.out.println("      - " + req[reqIdx].getName() + ":" + req[reqIdx].getFilter());
+                                    System.out.println("      - " + req[reqIdx].getRequirement().getName() + ":" + req[reqIdx].getRequirement().getFilter());
                                 }
                             }
                         }
@@ -116,7 +117,7 @@
                 try
                 {
                     System.out.print("\nDeploying...");
-                    resolver.deploy(start);
+                    resolver.deploy(start ? Resolver.START : 0);
                     System.out.println("done.");
                 }
                 catch (IllegalStateException ex)
@@ -125,16 +126,13 @@
                 }
             }
         } else {
-            Requirement[] reqs = resolver.getUnsatisfiedRequirements();
+            Reason[] reqs = resolver.getUnsatisfiedRequirements();
             if ((reqs != null) && (reqs.length > 0)) {
                 System.out.println("Unsatisfied requirement(s):");
                 printUnderline(System.out, 27);
                 for (int reqIdx = 0; reqIdx < reqs.length; reqIdx++) {
-                    System.out.println("   " + reqs[reqIdx].getName() + ":" + reqs[reqIdx].getFilter());
-                    Resource[] resources = resolver.getResources(reqs[reqIdx]);
-                    for (int resIdx = 0; resIdx < resources.length; resIdx++) {
-                        System.out.println("      " + resources[resIdx].getPresentationName());
-                    }
+                    System.out.println("   " + reqs[reqIdx].getRequirement().getName() + ":" + reqs[reqIdx].getRequirement().getFilter());
+                    System.out.println("      " +reqs[reqIdx].getResource().getPresentationName());
                 }
             } else {
                 System.out.println("Could not resolve targets.");
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 7bc4df4..403b05c 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
@@ -16,6 +16,7 @@
  */
 package org.apache.felix.karaf.shell.obr;
 
+import java.net.URI;
 import java.net.URL;
 import java.util.List;
 
@@ -48,10 +49,10 @@
             }
             else
             {
-                URL srcURL = (URL) resource.getProperties().get(Resource.SOURCE_URL);
+                URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI);
                 if (srcURL != null)
                 {
-                    FileUtil.downloadSource(System.out, System.err, srcURL, localDir, extract);
+                    FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract);
                 }
                 else
                 {
