geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r614628 - in /geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands: ConnectCommand.groovy StopServerCommand.groovy
Date Wed, 23 Jan 2008 19:17:32 GMT
Author: jdillon
Date: Wed Jan 23 11:17:29 2008
New Revision: 614628

URL: http://svn.apache.org/viewvc?rev=614628&view=rev
Log:
Add options to handle host/port/user/pass for shutdown

Modified:
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ConnectCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ConnectCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ConnectCommand.groovy?rev=614628&r1=614627&r2=614628&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ConnectCommand.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ConnectCommand.groovy
Wed Jan 23 11:17:29 2008
@@ -51,7 +51,11 @@
 
     protected Object doExecute() throws Exception {
         io.out.println("Connecting to Geronimo server: ${hostname}:${port}")
-
+        
+        //
+        // TODO: If no password given, then prompt for password
+        //
+        
         def kernel = new BasicKernel("gshell deployer")
         def deploymentManager = new RemoteDeploymentManager(Collections.emptySet());
         def deploymentFactory = new DeploymentFactoryWithKernel(kernel, deploymentManager)

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy?rev=614628&r1=614627&r2=614628&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
Wed Jan 23 11:17:29 2008
@@ -19,6 +19,7 @@
 
 package org.apache.geronimo.commands
 
+import org.apache.geronimo.gshell.clp.Option
 import org.apache.geronimo.gshell.command.annotation.CommandComponent
 import org.apache.geronimo.gshell.command.CommandSupport
 
@@ -31,21 +32,25 @@
 class StopServerCommand
     extends CommandSupport
 {
-    //
-    // TODO: Expose as options, maybe expose a single URI-ish thingy?
-    //
-
+    @Option(name='-s', aliases=['--hostname', '--server'], description='Hostname, default
localhost')
     String hostname = 'localhost'
 
+    @Option(name='-p', aliases=['--port'], description='Port, default 1099')
     int port = 1099
 
+    @Option(name='-u', aliases=['--username'], description='Username')
     String username = 'system'
 
+    @Option(name='-w', aliases=['--password'], description='Password')
     String password = 'manager'
     
     protected Object doExecute() throws Exception {
         io.out.println("Stopping Geronimo server: ${hostname}:${port}")
-
+        
+        //
+        // TODO: If no password given, then prompt for password
+        //
+        
         def server = new ServerProxy(hostname, port, username, password)
 
         server.shutdown();



Mime
View raw message