At 09:57 PM 04-05-01 -0400, Spencer Marks wrote:
>Hi,
>
>I was wondering if there's a way to get Ant to set properties that would
>then be available when a taskdef runs.
>
>For example, before running JUnit tests, I'd like to pass a system
>property specifying where test data is located. Then the JUnit test would
>know where to access installation specific data.
The junit task supports the sysproperty element which allows you to do
this, e.g.
<junit printsummary="yes" haltonfailure="no" fork="yes"
dir="${unit.test.dir}">
<sysproperty key="conf.dir" value="${unit.test.conf}"/>
<sysproperty key="log4j.configuration"
value="file:${unit.test.conf}/log4j.properties"/>
...
</junit>
HTH
Robert