You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2007/12/10 19:40:47 UTC

svn commit: r602990 - /geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/

Author: gawor
Date: Mon Dec 10 10:40:46 2007
New Revision: 602990

URL: http://svn.apache.org/viewvc?rev=602990&view=rev
Log:
untabify (eclipse groovy plugin sucks)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AbstractAliasCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AliasCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DeployModuleCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DistributeModuleCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ListConfigurationsCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RemoteServerControlCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartClientCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UnaliasCommand.groovy

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AbstractAliasCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AbstractAliasCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AbstractAliasCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AbstractAliasCommand.groovy Mon Dec 10 10:40:46 2007
@@ -59,8 +59,8 @@
     }
     
     def serializeToXML = { aliases ->
-	    def outputBuilder = new StreamingMarkupBuilder()
-	    outputBuilder.bind { mkp.yield aliases }
+            def outputBuilder = new StreamingMarkupBuilder()
+            outputBuilder.bind { mkp.yield aliases }
     }
     
     def createNewAliasFile = { aliasFile, aliasFileName, xml ->

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AliasCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AliasCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AliasCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/AliasCommand.groovy Mon Dec 10 10:40:46 2007
@@ -45,26 +45,26 @@
 
         def xml
         aliasFile.withInputStream {
-		    def aliases = new XmlSlurper().parse(it)
-		
-		    if (!aliasName) {
-		        io.out.println(buildAvailableAliases(aliases))
-		        return
-		    }
-		    
-		    if (!aliases.alias.find { it.@id.text().equals(aliasName) }.isEmpty()) {
-		        throw new IllegalArgumentException("${aliasName} is already defined")
-		    } else if (!command) {
-		        throw new IllegalArgumentException("command is required")
-		    }
-		    
-		    aliases.appendNode {
-		        alias(id: aliasName) {
-		            cli(command)
-		        }
-		    }
-		    
-		    xml = serializeToXML(aliases)
+                    def aliases = new XmlSlurper().parse(it)
+                
+                    if (!aliasName) {
+                        io.out.println(buildAvailableAliases(aliases))
+                        return
+                    }
+                    
+                    if (!aliases.alias.find { it.@id.text().equals(aliasName) }.isEmpty()) {
+                        throw new IllegalArgumentException("${aliasName} is already defined")
+                    } else if (!command) {
+                        throw new IllegalArgumentException("command is required")
+                    }
+                    
+                    aliases.appendNode {
+                        alias(id: aliasName) {
+                            cli(command)
+                        }
+                    }
+                    
+                    xml = serializeToXML(aliases)
         }
         
         if (!xml) {

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DeployModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DeployModuleCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DeployModuleCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DeployModuleCommand.groovy Mon Dec 10 10:40:46 2007
@@ -56,7 +56,7 @@
         def consoleReader = new ConsoleReader(io.inputStream, io.out)
         
         def commandArgs = []
-		commandArgs.add(module)        
+                commandArgs.add(module)        
         if (modulePlan) {
             commandArgs.add(modulePlan)
         }

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DistributeModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DistributeModuleCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DistributeModuleCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/DistributeModuleCommand.groovy Mon Dec 10 10:40:46 2007
@@ -56,7 +56,7 @@
         def consoleReader = new ConsoleReader(io.inputStream, io.out)
         
         def commandArgs = []
-		commandArgs.add(module)        
+        commandArgs.add(module)        
         if (modulePlan) {
             commandArgs.add(modulePlan)
         }

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ListConfigurationsCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ListConfigurationsCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ListConfigurationsCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ListConfigurationsCommand.groovy Mon Dec 10 10:40:46 2007
@@ -19,7 +19,6 @@
 
 package org.apache.geronimo.commands
 
-
 import jline.ConsoleReader
 
 import org.apache.geronimo.gshell.clp.Option
@@ -66,11 +65,11 @@
             variables.parent.set("AvailablePlugins", plugins)
         }
         if (plugins) {
-        	def pluginsToInstall = command.getInstallList(plugins, consoleReader, repo)
-        	if (pluginsToInstall) {
-            	command.installPlugins(connection.getDeploymentManager(), pluginsToInstall, repo, consoleReader, connection)
-        	}
+            def pluginsToInstall = command.getInstallList(plugins, consoleReader, repo)
+            if (pluginsToInstall) {
+                command.installPlugins(connection.getDeploymentManager(), pluginsToInstall, repo, consoleReader, connection)
+            }
         }
         io.out.println("list ended")
     }
-}
\ No newline at end of file
+}

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RemoteServerControlCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RemoteServerControlCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RemoteServerControlCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RemoteServerControlCommand.groovy Mon Dec 10 10:40:46 2007
@@ -59,16 +59,16 @@
         result
     }
 
-	protected executeRshCommand(is) {
+    protected executeRshCommand(is) {
         def configuration = new XmlSlurper().parse(is)
 
         def retrieveByNameAttribute = { baseNode, name ->
-	        def node = baseNode.find { it.@name.text().equals(name) }
-	        if (node.isEmpty()) {
-	            def availableNames = baseNode.list().sort{ it.@name.text() }.'@name'*.text()
-	            throw new IllegalArgumentException("${name} does not exist. Available: ${availableNames}")
-	        }
-	        node
+                def node = baseNode.find { it.@name.text().equals(name) }
+                if (node.isEmpty()) {
+                    def availableNames = baseNode.list().sort{ it.@name.text() }.'@name'*.text()
+                    throw new IllegalArgumentException("${name} does not exist. Available: ${availableNames}")
+                }
+                node
         }
 
         def server = retrieveByNameAttribute(configuration.servers.server, serverName)
@@ -79,14 +79,14 @@
             throw new IllegalStateException("gshell.remote-login-cmd is not defined by host ${host.@name.text()}")
         }
         
-	    def command = server.controls."${control}".text()
-	    if ('' == command) {
+        def command = server.controls."${control}".text()
+        if ('' == command) {
             def controls = server.controls.'*'.list().sort{ it.name() }*.name()
-	        throw new IllegalStateException("server.controls.${control} is not defined by server "
-	            + "${server.@name.text()}.\nAvailable controls: ${controls}")
-	    }
+                throw new IllegalStateException("server.controls.${control} is not defined by server "
+                    + "${server.@name.text()}.\nAvailable controls: ${controls}")
+        }
         
         executor.execute("${rshCmd} ${command}")
-	}
+    }
 
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartClientCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartClientCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartClientCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartClientCommand.groovy Mon Dec 10 10:40:46 2007
@@ -94,7 +94,7 @@
         // TODO: Add spawn support?
         //
         
-  		launcher.process = {
+        launcher.process = {
             try {
                 ant.java(jar: "$geronimoHome/bin/client.jar", dir: geronimoHome, failonerror: true, fork: true) {
                     def node = current.wrapper
@@ -153,9 +153,9 @@
                 
                 throw e
             }
-   		}
+        }
                 
-     	launcher.launch()
+        launcher.launch()
         
         return SUCCESS
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UnaliasCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UnaliasCommand.groovy?rev=602990&r1=602989&r2=602990&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UnaliasCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UnaliasCommand.groovy Mon Dec 10 10:40:46 2007
@@ -38,24 +38,24 @@
 class UnaliasCommand extends AbstractAliasCommand {
 
     protected Object doExecute() throws Exception {
-	    def aliasFile = checkAliasFile()
+        def aliasFile = checkAliasFile()
 
-	    if (!aliasName) {
-	        throw new IllegalArgumentException("an alias must be specified")
-	    }
+        if (!aliasName) {
+                throw new IllegalArgumentException("an alias must be specified")
+        }
 
         def xml
         aliasFile.withInputStream {
-		    def aliases = new XmlSlurper().parse(it)
-		    
-		    def alias = aliases.alias.find { it.@id.text().equals(aliasName) }
-		    if ('' == alias.text()) {
-		        return
-		    }
-		    
-		    alias.replaceNode {}
-		    
-		    xml = serializeToXML(aliases)
+                    def aliases = new XmlSlurper().parse(it)
+                    
+                    def alias = aliases.alias.find { it.@id.text().equals(aliasName) }
+                    if ('' == alias.text()) {
+                        return
+                    }
+                    
+                    alias.replaceNode {}
+                    
+                    xml = serializeToXML(aliases)
         }
         
         if (!xml) {