Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 49355 invoked from network); 6 Dec 2002 04:24:17 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Dec 2002 04:24:17 -0000 Received: (qmail 20977 invoked by uid 97); 6 Dec 2002 04:25:29 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 20939 invoked by uid 97); 6 Dec 2002 04:25:28 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 20925 invoked by uid 50); 6 Dec 2002 04:25:27 -0000 Date: 6 Dec 2002 04:25:27 -0000 Message-ID: <20021206042527.20924.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 15131] New: - Junit task fails to correctly set its classpath under Java 1.4 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=15131 Junit task fails to correctly set its classpath under Java 1.4 Summary: Junit task fails to correctly set its classpath under Java 1.4 Product: Ant Version: 1.5 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Optional Tasks AssignedTo: ant-dev@jakarta.apache.org ReportedBy: samant.maharaj@orion.co.nz This is an issue under Java 1.4 when the classpath contains spaces. I have traced this code to JUnitTask.addClasspathEntry(). The call to getClass ().getResource() returns an escaped URL under 1.4 but an unescaped URL under 1.3. This means that when run, results such as the following are seen: [junit] java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner [junit] Exception in thread "main" [junit] TEST nz.co.orion.audit.AuditLogTest FAILED [junit] java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner [junit] Exception in thread "main" [junit] TEST nz.co.orion.discovery.DiscoveryServerTest FAILED [junit] java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner [junit] Exception in thread "main" [junit] TEST nz.co.orion.hl7datatype.HL7DataTypeSpecificationTest FAILED [junit] java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner [junit] Exception in thread "main" [junit] TEST nz.co.orion.hl7datatype.HL7DataTypeTest FAILED Debug output reveals: [junit] Implicitly adding P:\Resources\Source\Concerto% 20MAP\Concerto\lib\junit.jar;P:\Resources\Source\Concerto% 20MAP\Concerto\lib\ant\ant.jar;P:\Resources\Source\Concerto% 20MAP\Concerto\lib\ant\optional.jar to CLASSPATH dropping P:\Resources\Source\Concerto%20MAP\Concerto\lib\junit.jar from path as it doesn't exist dropping P:\Resources\Source\Concerto%20MAP\Concerto\lib\ant\ant.jar from path as it doesn't exist dropping P:\Resources\Source\Concerto%20MAP\Concerto\lib\ant\optional.jar from path as it doesn't exist I can confirm that this definitely does not occure when building under JDK 1.3. -- To unsubscribe, e-mail: For additional commands, e-mail: