geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r562056 - /geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Date Thu, 02 Aug 2007 09:53:06 GMT
Author: jdillon
Date: Thu Aug  2 02:53:06 2007
New Revision: 562056

URL: http://svn.apache.org/viewvc?view=rev&rev=562056
Log:
And the server bootith

Modified:
    geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy

Modified: geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy?view=diff&rev=562056&r1=562055&r2=562056
==============================================================================
--- geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
(original)
+++ geronimo/sandbox/server-gshell-launcher/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Thu Aug  2 02:53:06 2007
@@ -34,46 +34,7 @@
     extends CommandSupport
 {
     File geronimoHome
-    
-    StartServerCommand() {
-        super('start-server')
-    }
-
-    protected String getUsage() {
-        //
-        // NOTE: super.usage here makes a stack over flow, should probably report to the
groovy folks
-        //
-        
-        return super.getUsage() // TODO:
-    }
 
-    protected boolean processCommandLine(CommandLine line) throws CommandException {
-        assert line
-
-        //
-        // TODO:
-        //
-        
-        return false
-    }
-
-    protected Object doExecute(Object[] args) throws Exception {
-        assert args != null
-        
-        def ant = new AntBuilder()
-        
-        if (!geronimoHome) {
-            geronimoHome = new File(System.properties['gshell.home'])
-        }
-        
-        println "Geronimo home: $geronimoHome"
-        
-        ant.java(jar: "$geronimoHome/bin/server.jar", dir: geronimoHome, failonerror: true,
fork: true) {
-        }
-        
-        return Command.SUCCESS
-    }
-    
     /**
      * Flag to control if we background the server or block Maven execution.
      */
@@ -97,7 +58,7 @@
     /**
      * Enable verbose mode.
      */
-    boolean verbose = false
+    boolean verbose = true
 
     /**
      * Enable veryverbose mode.
@@ -120,6 +81,66 @@
      */
     boolean propagateGeronimoProperties = true
     
+    StartServerCommand() {
+        super('start-server')
+    }
+
+    protected String getUsage() {
+        //
+        // NOTE: super.usage here makes a stack over flow, should probably report to the
groovy folks
+        //
+        
+        return super.getUsage() // TODO:
+    }
+
+    protected boolean processCommandLine(CommandLine line) throws CommandException {
+        assert line
+
+        //
+        // TODO:
+        //
+        
+        return false
+    }
+
+    protected Object doExecute(Object[] args) throws Exception {
+        assert args != null
+        
+        def ant = new AntBuilder()
+        
+        if (!geronimoHome) {
+            geronimoHome = new File(System.properties['gshell.home'])
+        }
+        
+        println "Geronimo home: $geronimoHome"
+        
+        ant.java(jar: "$geronimoHome/bin/server.jar", dir: geronimoHome, failonerror: true,
fork: true) {
+            // Set the properties which we pass to the JVM from the startup script
+            sysproperty(key: 'org.apache.geronimo.base.dir', file: geronimoHome)
+            sysproperty(key: 'java.io.tmpdir', value: 'var/temp') // Use relative path
+            sysproperty(key: 'java.endorsed.dirs', value: prefixSystemPath('java.endorsed.dirs',
new File(geronimoHome, 'lib/endorsed')))
+            sysproperty(key: 'java.ext.dirs', value: prefixSystemPath('java.ext.dirs', new
File(geronimoHome, 'lib/ext')))
+
+        }
+        
+        if (quiet) {
+            arg(value: '--quiet')
+        }
+        else {
+            arg(value: '--long')
+        }
+        
+        if (verbose) {
+            arg(value: '--verbose')
+        }
+        
+        if (veryverbose) {
+            arg(value: '--veryverbose')
+        }
+        
+        return Command.SUCCESS
+    }
+    
     /*
     void execute() {
         //
@@ -307,7 +328,8 @@
             t.join()
         }
     }
-
+    */
+    
     private String prefixSystemPath(String name, File file) {
         assert name
         assert file
@@ -320,5 +342,4 @@
         
         return path
     }
-    */
 }



Mime
View raw message