tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dun...@hyperreal.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant Main.java
Date Wed, 17 Nov 1999 07:59:53 GMT
duncan      99/11/16 23:59:52

  Modified:    .        ant.jar
               ant/src/main/org/apache/tools/ant Main.java
  Log:
  Added comment about -Dname=value parsing
  
  Revision  Changes    Path
  1.14      +118 -46   jakarta-tools/ant.jar
  
  	<<Binary file>>
  
  
  1.5       +12 -3     jakarta-tools/ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Main.java	1999/11/01 04:54:26	1.4
  +++ Main.java	1999/11/17 07:59:52	1.5
  @@ -59,9 +59,18 @@
   		    return;
   		}
   	    } else if (arg.startsWith("-D")) {
  -                arg = arg.substring(2, arg.length());
  -                String value = args[++i];
  -                definedProps.put(arg, value);
  +
  +		/* Interestingly enough, we get to here when a user
  +		 * uses -Dname=value. However, the JDK goes ahead
  +		 * and parses this out to args {"-Dname", "value"}
  +		 * so instead of parsing on "=", we just make the "-D"
  +		 * characters go away and skip one argument forward.
  +		 */
  +		
  +                String name = arg.substring(2, arg.length());
  +		String value = args[++i];
  +                definedProps.put(name, value);
  +		System.out.println("n: "+ name + " v: " + value);
               } else if (arg.startsWith("-")) {
   		// we don't have any more args to recognize!
   		String msg = "Unknown arg: " + arg;
  
  
  

Mime
View raw message