bodewig     2003/09/19 02:18:16

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
  Log:
  <junit includeantruntime="true" fork="true"> replaced the CLASSPATH
  instead of adding to it.
  
  PR: 14971
  
  Revision  Changes    Path
  1.503     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.502
  retrieving revision 1.503
  diff -u -r1.502 -r1.503
  --- WHATSNEW  18 Sep 2003 15:47:47 -0000      1.502
  +++ WHATSNEW  19 Sep 2003 09:18:16 -0000      1.503
  @@ -242,6 +242,9 @@
   * The socket condition will now close the socket created to test.
     Bugzilla Report 23040.
   
  +* <junit includeantruntime="true" fork="true"> replaced the CLASSPATH instead
  +  of adding to it.  Bugzilla Report 14971.
  +
   Other changes:
   --------------
   * All tasks can be used outside of <target>s.  Note that some tasks
  
  
  
  1.83      +12 -1     
ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- JUnitTask.java    17 Sep 2003 08:30:30 -0000      1.82
  +++ JUnitTask.java    19 Sep 2003 09:18:16 -0000      1.83
  @@ -717,6 +717,17 @@
           cmd.createArgument().setValue("haltOnFailure="
                                         + test.getHaltonfailure());
           if (includeAntRuntime) {
  +            Vector v = Execute.getProcEnvironment();
  +            Enumeration e = v.elements();
  +            while (e.hasMoreElements()) {
  +                String s = (String) e.nextElement();
  +                if (s.startsWith("CLASSPATH=")) {
  +                    cmd.createClasspath(getProject()).createPath()
  +                        .append(new Path(getProject(), 
  +                                         s.substring(10 // 
"CLASSPATH=".length()
  +                                                     )));
  +                }
  +            }
               log("Implicitly adding " + antRuntimeClasses + " to CLASSPATH",
                   Project.MSG_VERBOSE);
               cmd.createClasspath(getProject()).createPath()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to