Merge tag 'v2.3.28' into testing
[lgpl/argeo-commons.git] / org.argeo.cms.jshell / src / org / argeo / internal / cms / jshell / osgi / OsgiExecutionControlProvider.java
index 9ebf97ed07be957c25203e409a9272986a9badf5..67515e69cbf8c1f0de8c19014e6b5e87b5cf75e8 100644 (file)
@@ -212,7 +212,7 @@ public class OsgiExecutionControlProvider implements ExecutionControlProvider {
 
        static Path bundleToPath(Path frameworkLocation, Bundle bundle) throws IOException {
                String location = bundle.getLocation();
-               if (location.startsWith("initial@reference:file:")) {
+               if (location.startsWith("initial@reference:file:")) {// Eclipse IDE environment
                        location = location.substring("initial@reference:file:".length());
                        Path p = frameworkLocation.getParent().resolve(location).toAbsolutePath();
                        if (Files.exists(p)) {
@@ -225,6 +225,15 @@ public class OsgiExecutionControlProvider implements ExecutionControlProvider {
                                log.warn("Ignore bundle " + p + " as it does not exist");
                                return null;
                        }
+               } else if (location.startsWith("reference:file:")) {// a2+reference
+                       location = location.substring("reference:".length());
+                       Path p = Paths.get(URI.create(location));
+                       if (Files.exists(p)) {
+                               return p;
+                       } else {
+                               log.warn("Ignore bundle " + p + " as it does not exist");
+                               return null;
+                       }
                }
                Path p = Paths.get(location);
                return p;