DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21142>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21142 junit task's classpath doesn't override the existing classpath settings Summary: junit task's classpath doesn't override the existing classpath settings Product: Ant Version: 1.5.3 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When defining a nested classpath element in <junit> task it doesn't override the system's CLASSPATH as it does with <java> task. Below is an example what I mean. <junit> <classpath> <path refid="project.class.path"/> </classpath> <test name="JUnitTest" todir="${test.log}"/> </junit> This should override the existing classpath settings and use only "project.class.path" path, but it doesn't. Now the first question is it even supposed to override? If not, it should because: - the <junit> task behaviour is a bit confusing when comparing to <java> task behaviour. - this leads to problems in some cases (see example below). Let's suppose that I'm developing something with a version of Xerces that is different from the one ant uses (and has under it's ANT_HOME/lib) directory. Let's call these versions: - XercesMyLib.jar - resides in my projects lib directory - XercesAnt.jar - resides in ANT_HOME/lib directory Now I'm having <junit> task like this. <junit fork="yes"> <classpath> <path refid="project.class.path"/> </classpath> <test name="JUnitTest" todir="${test.log}"/> </junit> And I forget to put XercesMyLib.jar into my project.class.path. POSSIBLE RESULTS (both of them aren't very desirable): - Unit tests fail because of the wrong Xerces version - Unit tests pass, but the project won't execute because the correct Xerces libraries are missing. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]