You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/05/17 11:11:32 UTC

[1/2] git commit: [KARAF-2974] Specify the syntax format in OBR commands

Repository: karaf
Updated Branches:
  refs/heads/master 036570fe9 -> f9a03a363


[KARAF-2974] Specify the syntax format in OBR commands


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

Branch: refs/heads/master
Commit: 431b57953c43e1edb2766aefd9d29ddbba48c903
Parents: 036570f
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Sat May 17 11:08:42 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Sat May 17 11:08:42 2014 +0200

----------------------------------------------------------------------
 manual/src/main/webapp/users-guide/obr.conf     | 71 ++++++++++++++++++++
 .../apache/karaf/obr/command/DeployCommand.java |  2 +-
 .../apache/karaf/obr/command/InfoCommand.java   |  2 +-
 .../apache/karaf/obr/command/SourceCommand.java |  2 +-
 .../apache/karaf/obr/command/StartCommand.java  |  2 +-
 5 files changed, 75 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/431b5795/manual/src/main/webapp/users-guide/obr.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/obr.conf b/manual/src/main/webapp/users-guide/obr.conf
index f3b268d..b8a7a57 100644
--- a/manual/src/main/webapp/users-guide/obr.conf
+++ b/manual/src/main/webapp/users-guide/obr.conf
@@ -168,6 +168,21 @@ Capabilities:
    package:{package=org.apache.karaf.wrapper.management, uses:=javax.management, version=3.0.0}
 {code}
 
+The {{obr:info}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
+It means that you have to use the following command to see the info about the wrapper core bundle with version 3.0.0:
+
+{code}
+karaf@root()> obr:info org.apache.karaf.wrapper.core,3.0.0
+...
+{code}
+
+You can specific multiple bundles separated by space:
+
+{code}
+karaf@root()> obr:info org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
+...
+{code}
+
 h3. {{obr:source}}
 
 In addition of the bundles executable, the OBR service can also store the bundles sources.
@@ -178,6 +193,20 @@ The {{obr:source}} command check the source URL in the OBR metadata for a given
 karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core
 {code}
 
+The {{obr:source}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
+It means that you have to use the following command to download the source of wrapper core bundle with version 3.0.0:
+
+{code}
+karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,3.0.0
+{code}
+
+You can specify multiple bundles separated by space:
+
+{code}
+karaf@root()> obr:source /tmp org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
+...
+{code}
+
 h3. {{obr:resolve}}
 
 The {{obr:resolve}} command displays the resolution output for a given set of requirements. Actually, it show the bundles providing
@@ -252,11 +281,53 @@ Deploying...done.
 
 By default, the bundles are just installed, not started. You can use the {{-s}} option to start the bundles.
 
+The {{obr:deploy}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
+It means that you have to use the following command to deploy the wrapper core bundle with version 3.0.0:
+
+{code}
+karaf@root()> obr:deploy org.apache.karaf.wrapper.core,3.0.0
+{code}
+
+You can specify multiple bundles separated by space:
+
+{code}
+karaf@root()> obr:deploy org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
+...
+{code}
+
 h2. {{obr:start}}
 
 The {{obr:start}} command does the same as {{obr:deploy -s}} command. It installs the bundle (and all required bundles to
 satisfy the requirements) and starts all installed bundles.
 
+{code}
+karaf@root()> obr:start org.ops4j.pax.web.samples.helloworld-hs
+Target resource(s):
+-------------------
+   OPS4J Pax Web - Samples - Hello World - HttpService (4.0.0.SNAPSHOT)
+
+Required resource(s):
+---------------------
+   Apache ServiceMix :: Specs :: Activation API 1.4 (2.3.0.SNAPSHOT)
+   OPS4J Pax Web - Jetty Bundle (4.0.0.SNAPSHOT)
+
+Deploying...done.
+{code}
+
+The {{obr:start}} command uses the following syntax to identify the bundles: {{symbolic_name,version}} where {{version}} is optional.
+It means that you have to use the following command to deploy and start the wrapper core bundle with version 3.0.0:
+
+{code}
+karaf@root()> obr:start org.apache.karaf.wrapper.core,3.0.0
+{code}
+
+You can specify multiple bundles separated by space:
+
+{code}
+karaf@root()> obr:start org.apache.karaf.wrapper.core,3.0.0 org.apache.karaf.wrapper.command,3.0.0
+...
+{code}
+
 h2. JMX ObrMBean
 
 On the JMX layer, Apache Karaf provides a MBean dedicated to the management of the OBR service: the ObrMBean.

http://git-wip-us.apache.org/repos/asf/karaf/blob/431b5795/obr/src/main/java/org/apache/karaf/obr/command/DeployCommand.java
----------------------------------------------------------------------
diff --git a/obr/src/main/java/org/apache/karaf/obr/command/DeployCommand.java b/obr/src/main/java/org/apache/karaf/obr/command/DeployCommand.java
index a852c70..4f4ce30 100644
--- a/obr/src/main/java/org/apache/karaf/obr/command/DeployCommand.java
+++ b/obr/src/main/java/org/apache/karaf/obr/command/DeployCommand.java
@@ -28,7 +28,7 @@ import org.apache.karaf.shell.api.action.lifecycle.Service;
 @Service
 public class DeployCommand extends ObrCommandSupport {
 
-    @Argument(index = 0, name = "bundles", description = "List of bundle names to deploy (separated by whitespaces)", required = true, multiValued = true)
+    @Argument(index = 0, name = "bundles", description = "List of bundle names to deploy (separated by whitespaces). The bundles are identified using the following syntax: symbolic_name,version where version is optional.", required = true, multiValued = true)
     protected List<String> bundles;
 
     @Option(name = "-s", aliases = { "--start" }, description = "Start the deployed bundles", required = false, multiValued = false)

http://git-wip-us.apache.org/repos/asf/karaf/blob/431b5795/obr/src/main/java/org/apache/karaf/obr/command/InfoCommand.java
----------------------------------------------------------------------
diff --git a/obr/src/main/java/org/apache/karaf/obr/command/InfoCommand.java b/obr/src/main/java/org/apache/karaf/obr/command/InfoCommand.java
index bacc61b..905e7dd 100644
--- a/obr/src/main/java/org/apache/karaf/obr/command/InfoCommand.java
+++ b/obr/src/main/java/org/apache/karaf/obr/command/InfoCommand.java
@@ -34,7 +34,7 @@ import org.apache.karaf.shell.api.action.lifecycle.Service;
 @Service
 public class InfoCommand extends ObrCommandSupport {
 
-    @Argument(index = 0, name = "bundles", description = "Specify bundles to query for information (separated by whitespaces)", required = true, multiValued = true)
+    @Argument(index = 0, name = "bundles", description = "Specify bundles to query for information (separated by whitespaces). The bundles are identified using the following syntax: symbolic_name,version where version is optional.", required = true, multiValued = true)
     List<String> bundles;
 
     protected void doExecute(RepositoryAdmin admin) throws Exception {

http://git-wip-us.apache.org/repos/asf/karaf/blob/431b5795/obr/src/main/java/org/apache/karaf/obr/command/SourceCommand.java
----------------------------------------------------------------------
diff --git a/obr/src/main/java/org/apache/karaf/obr/command/SourceCommand.java b/obr/src/main/java/org/apache/karaf/obr/command/SourceCommand.java
index 161ba82..ae215ee 100644
--- a/obr/src/main/java/org/apache/karaf/obr/command/SourceCommand.java
+++ b/obr/src/main/java/org/apache/karaf/obr/command/SourceCommand.java
@@ -37,7 +37,7 @@ public class SourceCommand extends ObrCommandSupport {
     @Argument(index = 0, name = "folder", description = "Local folder for storing sources", required = true, multiValued = false)
     String localDir;
 
-    @Argument(index = 1, name = "bundles", description = "List of bundles to download the sources for", required = true, multiValued = true)
+    @Argument(index = 1, name = "bundles", description = "List of bundles to download the sources for. The bundles are identified using the following syntax: symbolic_name,version where version is optional.", required = true, multiValued = true)
     List<String> bundles;
 
     protected void doExecute(RepositoryAdmin admin) throws Exception {

http://git-wip-us.apache.org/repos/asf/karaf/blob/431b5795/obr/src/main/java/org/apache/karaf/obr/command/StartCommand.java
----------------------------------------------------------------------
diff --git a/obr/src/main/java/org/apache/karaf/obr/command/StartCommand.java b/obr/src/main/java/org/apache/karaf/obr/command/StartCommand.java
index 0465bae..a6d0cd6 100644
--- a/obr/src/main/java/org/apache/karaf/obr/command/StartCommand.java
+++ b/obr/src/main/java/org/apache/karaf/obr/command/StartCommand.java
@@ -28,7 +28,7 @@ import java.util.List;
 @Service
 public class StartCommand extends ObrCommandSupport {
 
-    @Argument(index = 0, name = "bundles", description = "List of bundles to deploy (separated by whitespaces)", required = true, multiValued = true)
+    @Argument(index = 0, name = "bundles", description = "List of bundles to deploy (separated by whitespaces). The bundles are identified using the following syntax: symbolic_name,version where version is optional.", required = true, multiValued = true)
     protected List<String> bundles;
 
     @Option(name = "-d", aliases = { "--deployOptional" }, description = "Deploy optional bundles", required = false, multiValued = false)


[2/2] git commit: [KARAF-2974] Document the syntax to use to identify bundles in the OBR MBean

Posted by jb...@apache.org.
[KARAF-2974] Document the syntax to use to identify bundles in the OBR MBean


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

Branch: refs/heads/master
Commit: f9a03a363eda9a47cafb4f857fa3276672fa270c
Parents: 431b579
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Sat May 17 11:10:36 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Sat May 17 11:10:36 2014 +0200

----------------------------------------------------------------------
 manual/src/main/webapp/users-guide/obr.conf | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f9a03a36/manual/src/main/webapp/users-guide/obr.conf
----------------------------------------------------------------------
diff --git a/manual/src/main/webapp/users-guide/obr.conf b/manual/src/main/webapp/users-guide/obr.conf
index b8a7a57..788189d 100644
--- a/manual/src/main/webapp/users-guide/obr.conf
+++ b/manual/src/main/webapp/users-guide/obr.conf
@@ -350,6 +350,8 @@ h3. Operations
  If {{start}} is {{true}}, the bundles are automatically started. If {{deployOptional}} is {{true}}, even the optional requirements will be resolved
  by the OBR service (meaning installing more bundles to satisfy the optional requirements).
 
+The name to identify a bundle uses the following syntax: {{symbolic_name,version}} where version is optional.
+
 h2. Apache Karaf Cave
 
 In addition of being an OBR client, Apache Karaf can act as an OBR repositories server, thanks to Apache Karaf Cave.