geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r651020 - in /geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands: BaseJavaCommand.groovy StartServerCommand.groovy
Date Wed, 23 Apr 2008 19:25:49 GMT
Author: jdillon
Date: Wed Apr 23 12:25:47 2008
New Revision: 651020

URL: http://svn.apache.org/viewvc?rev=651020&view=rev
Log:
(GERONIMO-3651) Give commands which spawn java processes a --profile|-P flag to users to pass
in additional information to be handled by rc.d scripts to say append debug flags or whatever

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

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/BaseJavaCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/BaseJavaCommand.groovy?rev=651020&r1=651019&r2=651020&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/BaseJavaCommand.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/BaseJavaCommand.groovy
Wed Apr 23 12:25:47 2008
@@ -32,6 +32,11 @@
 import org.apache.geronimo.commands.AntBuilder
 import org.apache.geronimo.gshell.shell.ShellInfo
 
+/**
+ * Support for commands which spin off a Java process.
+ *
+ * @version $Rev: 650911 $ $Date: 2008-04-23 22:37:46 +0700 (Wed, 23 Apr 2008) $
+ */
 abstract class BaseJavaCommand extends CommandSupport {
     AntBuilder ant
 
@@ -56,6 +61,15 @@
     @Option(name='-t', aliases=['--timeout'], description='Specify the timeout for the server
process in seconds')
     int timeout = -1
     
+    List<String> profiles = []
+    
+    @Option(name='-P', aliases=['--profile'], metaVar='NAME', description='Select a configuration
profile')
+    private void appendProfile(String name) {
+        assert name
+        
+        profiles << name
+    }
+    
     Map properties = [:]
     
     protected void addPropertyFrom(final String nameValue, final String prefix) {
@@ -113,7 +127,7 @@
         
         return file
     }
-           
+
     /**
      * Process custom rc.d scripts.
      */

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy?rev=651020&r1=651019&r2=651020&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Wed Apr 23 12:25:47 2008
@@ -54,7 +54,7 @@
         else {
             verbose--
         }
-    }            
+    }
     
     @Option(name='-m', aliases=['--module'], metaVar='NAME', description='Start up a specific
module by name')
     List<String> startModules = []
@@ -91,10 +91,11 @@
         
         processScripts()
         
-        //Setup default java flags
+        // Setup default java flags
         if (javaAgentJar) {
             javaFlags << "-javaagent:${javaAgentJar.canonicalPath}"
         }
+        
         // If we are not backgrounding, then add a nice message for the user when ctrl-c
gets hit
         if (!background) {
             addShutdownHook({



Mime
View raw message