You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2004/11/09 16:00:44 UTC

svn commit: rev 57049 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli

Author: ammulder
Date: Tue Nov  9 07:00:43 2004
New Revision: 57049

Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
Log:
Accept "url" as a synonym for "uri".
Don't let the user specify more than one of the same argument.


Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java	(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java	Tue Nov  9 07:00:43 2004
@@ -81,13 +81,25 @@
         this.in = in;
         for(int i = 0; i < args.length; i++) {
             String arg = args[i];
-            if(arg.equals("--uri")) {
+            if(arg.equals("--uri") || arg.equals("--url")) {
+                if(uri != null) {
+                    throw new DeploymentSyntaxException("Cannot specify more than one URI");
+                }
                 uri = args[++i];
             } else if(arg.equals("--driver")) {
+                if(driver != null) {
+                    throw new DeploymentSyntaxException("Cannot specify more than one driver");
+                }
                 driver = args[++i];
             } else if(arg.equals("--user")) {
+                if(user != null) {
+                    throw new DeploymentSyntaxException("Cannot specify more than one user name");
+                }
                 user = args[++i];
             } else if(arg.equals("--password")) {
+                if(password != null) {
+                    throw new DeploymentSyntaxException("Cannot specify more than one password");
+                }
                 password = args[++i];
             } else {
                 throw new DeploymentException("Invalid option "+arg);