ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Leftwich <>
Subject Re: Exporting System.properites values
Date Sat, 05 May 2001 19:58:53 GMT
At 09:57 PM 04-05-01 -0400, Spencer Marks wrote:
>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" 

       <sysproperty key="conf.dir" value="${unit.test.conf}"/>
       <sysproperty key="log4j.configuration" 



View raw message