You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2015/07/08 13:47:23 UTC

[1/2] karaf git commit: When a bundle can not be used by the resolver, make sure we have the full uri in the error

Repository: karaf
Updated Branches:
  refs/heads/master 213eddfce -> 352ec82e0


When a bundle can not be used by the resolver, make sure we have the full uri in the error


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/410de5fa
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/410de5fa
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/410de5fa

Branch: refs/heads/master
Commit: 410de5fa46d89990ddb536dce46e1ecdf8af9f9f
Parents: 213eddf
Author: Guillaume Nodet <gn...@apache.org>
Authored: Tue Jul 7 14:00:57 2015 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Wed Jul 8 13:47:08 2015 +0200

----------------------------------------------------------------------
 .../karaf/features/internal/resolver/ResourceBuilder.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/410de5fa/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
index e5b2405..e624b7f 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
@@ -74,6 +74,14 @@ public final class ResourceBuilder {
     }
 
     public static ResourceImpl build(ResourceImpl resource, String uri, Map<String, String> headerMap, boolean removeServiceRequirements) throws BundleException {
+        try {
+            return doBuild(resource, uri, headerMap, removeServiceRequirements);
+        } catch (Exception e) {
+            throw new BundleException("Unable to build resource for " + uri + ": " + e.getMessage(), e);
+        }
+    }
+
+    private static ResourceImpl doBuild(ResourceImpl resource, String uri, Map<String, String> headerMap, boolean removeServiceRequirements) throws BundleException {
         // Verify that only manifest version 2 is specified.
         String manifestVersion = getManifestVersion(headerMap);
         if (manifestVersion == null || !manifestVersion.equals("2")) {


[2/2] karaf git commit: [KARAF-3837] The installation of the activemq feature is not stable wrt to the resolver

Posted by gn...@apache.org.
[KARAF-3837] The installation of the activemq feature is not stable wrt to the resolver

Fix the score optional import which is not wired because it comes from a fragment.


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/352ec82e
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/352ec82e
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/352ec82e

Branch: refs/heads/master
Commit: 352ec82e03ad515552e3b0bc83fd60cbe6feb547
Parents: 410de5f
Author: Guillaume Nodet <gn...@apache.org>
Authored: Wed Jul 8 13:27:24 2015 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Wed Jul 8 13:47:09 2015 +0200

----------------------------------------------------------------------
 .../karaf/features/internal/service/FeaturesServiceImpl.java      | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/352ec82e/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
index db80c33..d7042ec 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
@@ -1241,6 +1241,9 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
                     for (Iterator<BundleCapability> candIter = candidates.iterator(); candIter.hasNext(); ) {
                         BundleCapability cand = candIter.next();
                         BundleRevision br = cand.getRevision();
+                        if ((br.getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) {
+                            br = br.getWiring().getRequiredWires(null).get(0).getProvider();
+                        }
                         Resource res = bndToRes.get(br.getBundle());
                         if (!wired.contains(br) && !wired.contains(res)) {
                             candIter.remove();