junit ant task problems loading up a .properties file

S

Scout

I am trying to run a junit task via ant, and this is what the build
file snippet looks like.

<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement path="${project.classpath}"/>
</classpath>
<formatter type="plain"/>
<batchtest fork="no" todir="c:/test/junit/project">
<fileset dir="c:/test/project">
<include name="**/*Test.*"/>
<include name="**/*TestSuite.class"/>
</fileset>
</batchtest>
</junit>

where the project.classpath has been set via the 'property' task in
ant.

Within my code in the project, is a jar file, that reads a
my.properties file. This my.properties file is in the project/config
folder of the project.classpath property, but for some reason this
property file is not being picked up. As a result, the junit test
fails, since it cannot find the properties file necessary for its
execution. I also have the config/ folder added to the jar file that
reads the property file.

Is there anyway I can get the properties file to be loaded.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top