geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: rev 57049 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli
Date Tue, 09 Nov 2004 15:00:44 GMT
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);

Mime
View raw message