Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 371a351fa -> bf627f76a


use felix instead of osgi (as the signature of BundleWire called from 
BundleRevisionDependencies is different otherwise)


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/bf627f76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/bf627f76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/bf627f76

Branch: refs/heads/master
Commit: bf627f76a7ad959a3beb7095e409a90e4cfa6e06
Parents: 371a351
Author: Alex Heneveld <[email protected]>
Authored: Wed Aug 6 12:17:26 2014 -0400
Committer: Alex Heneveld <[email protected]>
Committed: Wed Aug 6 12:17:26 2014 -0400

----------------------------------------------------------------------
 core/src/main/java/brooklyn/util/osgi/Osgis.java | 19 ++++++++++++++-----
 pom.xml                                          |  6 ------
 software/osgi/pom.xml                            |  4 ++--
 usage/launcher/pom.xml                           |  4 ++--
 4 files changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/bf627f76/core/src/main/java/brooklyn/util/osgi/Osgis.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/util/osgi/Osgis.java 
b/core/src/main/java/brooklyn/util/osgi/Osgis.java
index c89ae54..c557a92 100644
--- a/core/src/main/java/brooklyn/util/osgi/Osgis.java
+++ b/core/src/main/java/brooklyn/util/osgi/Osgis.java
@@ -214,8 +214,17 @@ public class Osgis {
         if("felix.extensions".equals(manifestUrl.getHost())) return;
 
         try {
-            Manifest manifest = readManifest(manifestUrl);
-            if (!isValidBundle(manifest)) return;
+            Manifest manifest;
+            try {
+                manifest = readManifest(manifestUrl);
+                if (!isValidBundle(manifest)) return;
+            } catch (Exception e) {
+                Exceptions.propagateIfFatal(e);
+                // assume invalid manifest (however it normally follows the 
above path)
+                LOG.warn("Not able to install extension bundle from " + 
manifestUrl + "; probably it is not a bundle, ignoring: "+e, e);
+                return;
+            }
+            
             String versionedId = getVersionedId(manifest);
             URL bundleUrl = ResourceUtils.getContainerUrl(manifestUrl, 
MANIFEST_PATH);
 
@@ -224,7 +233,7 @@ public class Osgis {
                 if (!bundleUrl.equals(existingBundle.getLocation()) &&
                         //the framework bundle is always pre-installed, don't 
display duplicate info
                         !versionedId.equals(frameworkVersionedId)) {
-                    LOG.info("Ignoring duplicate " + versionedId + " from 
manifest " + manifestUrl + ", already loaded from " + 
existingBundle.getLocation());
+                    LOG.warn("Ignoring duplicate " + versionedId + " from 
manifest " + manifestUrl + ", already loaded from " + 
existingBundle.getLocation());
                 }
                 return;
             }
@@ -236,9 +245,9 @@ public class Osgis {
             Bundle newBundle = bundleContext.installBundle(EXTENSION_PROTOCOL 
+ ":" + bundleUrl.toString(), new ByteArrayInputStream(jar));
             installedBundles.put(versionedId, newBundle);
         } catch (IOException e) {
-            LOG.warn("Unable to load manifest from " + manifestUrl + ", 
ignoring.", e);
+            LOG.warn("Error installing extension bundle " + manifestUrl + ", 
ignoring: "+e, e);
         } catch (BundleException e) {
-            LOG.warn("Unable to load manifest from " + manifestUrl + ", 
ignoring.", e);
+            LOG.warn("Error installing extension bundle " + manifestUrl + ", 
ignoring: "+e, e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/bf627f76/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a47d03f..a4ac62e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,7 +137,6 @@
         <mockwebserver.version>20121111</mockwebserver.version>
         <httpclient.version>4.2.5</httpclient.version>
         <freemarker.version>2.3.19</freemarker.version>
-        <osgi-core.version>4.3.0</osgi-core.version>
         <commons-io.version>2.4</commons-io.version>
         <hazelcast.version>3.0</hazelcast.version>
         <jsonPath.version>0.9.1</jsonPath.version>
@@ -527,11 +526,6 @@
                 <version>${jopt.version}</version>
             </dependency>
             <dependency>
-                <groupId>org.osgi</groupId>
-                <artifactId>org.osgi.core</artifactId>
-                <version>${osgi-core.version}</version>
-            </dependency>
-            <dependency>
                 <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
                 <artifactId>concurrentlinkedhashmap-lru</artifactId>
                 <version>${concurrentlinkedhashmap.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/bf627f76/software/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/software/osgi/pom.xml b/software/osgi/pom.xml
index 43a6563..a67706c 100644
--- a/software/osgi/pom.xml
+++ b/software/osgi/pom.xml
@@ -68,8 +68,8 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
         </dependency>
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/bf627f76/usage/launcher/pom.xml
----------------------------------------------------------------------
diff --git a/usage/launcher/pom.xml b/usage/launcher/pom.xml
index 3a326c4..bb87f59 100644
--- a/usage/launcher/pom.xml
+++ b/usage/launcher/pom.xml
@@ -79,8 +79,8 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
         </dependency>
         <dependency>
             <groupId>com.googlecode.concurrentlinkedhashmap</groupId>

Reply via email to