ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15131] New: - Junit task fails to correctly set its classpath under Java 1.4
Date Fri, 06 Dec 2002 04:25:27 GMT
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=15131>.
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message