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 2018/04/12 16:12:32 UTC

[karaf] branch master updated (1c2b4eb -> 9e550d8)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git.


    from 1c2b4eb  [KARAF-5695]Starting Karaf Container 4.2.0 in Ubuntu 17.10 with OpenJDK 9 fails
     new 94b9534  [KARAF-5697] feature:start and feature:stop should be able to select multiple features
     new 9e550d8  [KARAF-5698] Upgrade to Felix Gogo Runtime / JLine 1.0.12

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../karaf/features/command/FeaturesCommandSupport.java  | 17 ++++++++++++++---
 .../karaf/features/command/StartFeaturesCommand.java    |  3 +--
 .../karaf/features/command/StopFeaturesCommand.java     |  3 +--
 pom.xml                                                 |  4 ++--
 4 files changed, 18 insertions(+), 9 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
gnodet@apache.org.

[karaf] 02/02: [KARAF-5698] Upgrade to Felix Gogo Runtime / JLine 1.0.12

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 9e550d8a654a08eae6ae487578bec8d545b1f6db
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Apr 12 18:12:21 2018 +0200

    [KARAF-5698] Upgrade to Felix Gogo Runtime / JLine 1.0.12
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4f17cbd..41448b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,8 +194,8 @@
         <felix.fileinstall.version>3.6.4</felix.fileinstall.version>
         <felix.framework.version>5.6.10</felix.framework.version>
         <felix.framework.security.version>2.6.0</felix.framework.security.version>
-        <felix.gogo.runtime.version>1.0.10</felix.gogo.runtime.version>
-        <felix.gogo.jline.version>1.0.10</felix.gogo.jline.version>
+        <felix.gogo.runtime.version>1.0.12</felix.gogo.runtime.version>
+        <felix.gogo.jline.version>1.0.12</felix.gogo.jline.version>
         <felix.httplite.version>0.1.6</felix.httplite.version>
         <felix.inventory.version>1.0.4</felix.inventory.version>
         <felix.plugin.version>3.5.0</felix.plugin.version>

-- 
To stop receiving notification emails like this one, please contact
gnodet@apache.org.

[karaf] 01/02: [KARAF-5697] feature:start and feature:stop should be able to select multiple features

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 94b9534045f34a1ec96d4cd543e959cf15cfe9f6
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Apr 12 17:20:41 2018 +0200

    [KARAF-5697] feature:start and feature:stop should be able to select multiple features
---
 .../karaf/features/command/FeaturesCommandSupport.java  | 17 ++++++++++++++---
 .../karaf/features/command/StartFeaturesCommand.java    |  3 +--
 .../karaf/features/command/StopFeaturesCommand.java     |  3 +--
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/features/command/src/main/java/org/apache/karaf/features/command/FeaturesCommandSupport.java b/features/command/src/main/java/org/apache/karaf/features/command/FeaturesCommandSupport.java
index 3efe67a..e7f6a84 100644
--- a/features/command/src/main/java/org/apache/karaf/features/command/FeaturesCommandSupport.java
+++ b/features/command/src/main/java/org/apache/karaf/features/command/FeaturesCommandSupport.java
@@ -17,9 +17,7 @@
 package org.apache.karaf.features.command;
 
 import java.net.URI;
-import java.util.EnumSet;
-import java.util.LinkedHashSet;
-import java.util.Set;
+import java.util.*;
 import java.util.regex.Pattern;
 
 import org.apache.karaf.features.Feature;
@@ -86,4 +84,17 @@ public abstract class FeaturesCommandSupport implements Action {
         }
         return matchingFeatures[0].getId();
     }
+
+    protected List<String> getFeatureIds(FeaturesService admin, List<String> nameOrIds) throws Exception {
+        List<String> ids = new ArrayList<>();
+        for (String nameOrId : nameOrIds) {
+            for (Feature f : admin.getFeatures(nameOrId)) {
+                ids.add(f.getId());
+            }
+        }
+        if (ids.isEmpty()) {
+            throw new IllegalArgumentException("No matching feature found for " + nameOrIds);
+        }
+        return ids;
+    }
 }
diff --git a/features/command/src/main/java/org/apache/karaf/features/command/StartFeaturesCommand.java b/features/command/src/main/java/org/apache/karaf/features/command/StartFeaturesCommand.java
index 2200aa0..7e86b82 100644
--- a/features/command/src/main/java/org/apache/karaf/features/command/StartFeaturesCommand.java
+++ b/features/command/src/main/java/org/apache/karaf/features/command/StartFeaturesCommand.java
@@ -51,8 +51,7 @@ public class StartFeaturesCommand extends FeaturesCommandSupport {
         addOption(FeaturesService.Option.Verbose, verbose);
         Map<String, Map<String, FeatureState>> stateChanges = new HashMap<>();
         Map<String, FeatureState> regionChanges = new HashMap<>();
-        for (String featureName : features) {
-            String featureId = getFeatureId(admin, featureName);
+        for (String featureId : getFeatureIds(admin, features)) {
             regionChanges.put(featureId, FeatureState.Started);
         }
         stateChanges.put(region, regionChanges);
diff --git a/features/command/src/main/java/org/apache/karaf/features/command/StopFeaturesCommand.java b/features/command/src/main/java/org/apache/karaf/features/command/StopFeaturesCommand.java
index f58ea50..cf7b397 100644
--- a/features/command/src/main/java/org/apache/karaf/features/command/StopFeaturesCommand.java
+++ b/features/command/src/main/java/org/apache/karaf/features/command/StopFeaturesCommand.java
@@ -51,8 +51,7 @@ public class StopFeaturesCommand extends FeaturesCommandSupport {
         addOption(FeaturesService.Option.Verbose, verbose);
         Map<String, Map<String, FeatureState>> stateChanges = new HashMap<>();
         Map<String, FeatureState> regionChanges = new HashMap<>();
-        for (String featureName : features) {
-            String featureId = getFeatureId(admin, featureName);
+        for (String featureId : getFeatureIds(admin, features)) {
             regionChanges.put(featureId, FeatureState.Resolved);
         }
         stateChanges.put(region, regionChanges);

-- 
To stop receiving notification emails like this one, please contact
gnodet@apache.org.