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 17230] New: - <junit> cannot find resources in classpath
Date Thu, 20 Feb 2003 04:51:31 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=17230>.
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=17230

<junit> cannot find resources in classpath

           Summary: <junit> cannot find resources in classpath
           Product: Ant
           Version: 1.5.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: hay_lam@yahoo.com


In the classpath, it includes two config directories which contain some 
*.properties file required for test cases. When junit is run, it can find all 
the classes, however, it can not load any *.properties files. The properties 
files are read as system resources so the path should be enough. If I change to 
use java task to run junit intead of junit task, everything works fine. I need 
to run junit task for junit report. Following is the piece of code from my 
build.xml. Thx.

 
<path id="test.classpath">
  <pathelement location="${SRC}/config"/>
  <pathelement location="${UNITTEST_SRC}/config/"/>
  <fileset dir="${JARDIR}">
    <include name="**/*.jar"/>
  </fileset>
  <fileset dir="${UNITTEST_JARDIR}">
    <include name="**/*.jar"/>
  </fileset>
  <fileset dir="${LIB}">
    <include name="**/*.jar"/>
  </fileset>
</path>

<junit printsummary="yes" fork="yes" haltonfailure="no"> 
  <formatter type="xml"/>     
     <classpath>
     	<path refid="test.classpath" />
     </classpath>
      
  <batchtest fork="no" todir="${UNITTEST_REPORT}"> 
    <fileset dir="${UNITTEST_SRC}"> 
      <include name="**/*Test.java"/>
    </fileset>
  </batchtest> 
</junit>

Mime
View raw message