activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1387857 - /activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
Date Thu, 20 Sep 2012 05:02:40 GMT
Author: tabish
Date: Thu Sep 20 05:02:39 2012
New Revision: 1387857

URL: http://svn.apache.org/viewvc?rev=1387857&view=rev
Log:
apply patch for: https://issues.apache.org/jira/browse/AMQ-3554

Modified:
    activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java

Modified: activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java?rev=1387857&r1=1387856&r2=1387857&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
(original)
+++ activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/CreateBrokerCommand.java
Thu Sep 20 05:02:39 2012
@@ -26,8 +26,9 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Scanner;
 
-import org.apache.felix.gogo.commands.Option;
+import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
+import org.apache.felix.gogo.commands.Option;
 import org.apache.karaf.shell.console.OsgiCommandSupport;
 
 /**
@@ -35,8 +36,8 @@ import org.apache.karaf.shell.console.Os
  */
  @Command(scope="activemq", name="create-broker", description="Creates a broker instance.")
 public class CreateBrokerCommand extends OsgiCommandSupport {
-    
-    @Option(name = "-n", aliases = {"--name"}, description = "The name of the broker (defaults
to localhost).")
+
+    @Argument(name = "name", description = "The name of the broker (defaults to localhost).")
     private String name = "localhost";
     @Option(name = "-t", aliases = {"--type"}, description = "type of configuration to be
used: spring or blueprint (defaults to spring)")
     private String type = "spring";
@@ -58,12 +59,12 @@ public class CreateBrokerCommand extends
 
             mkdir(deploy);
             File configFile = new File(deploy, name + "-broker.xml");
-            
+
             if (!type.equalsIgnoreCase("spring") && !type.equalsIgnoreCase("blueprint"))
{
                 System.out.println("@|green Unknown type '" + type + "' Using spring by default");
                 type = "spring";
             }
-            
+
             copyFilteredResourceTo(configFile, type.toLowerCase() + ".xml", props);
 
             System.out.println("");



Mime
View raw message