ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Passing sysproperties from a file
Date Fri, 03 Mar 2006 23:02:30 GMT
> -----Original Message-----
> From: [] 
> Sent: Wednesday, February 15, 2006 10:49 AM
> To:
> Subject: Passing sysproperties from a file
> Hi,
> I'm trying to include a set of properties, taken from a file, 
> in the Java task as system properties.
> I have been fiddling around with various combinations of 
> <property file="file.props" id="jeff" />  With <sysproperty 
> refid="jeff" /> in the Java task, but with no joy.
Sorry for the late reply... First of all, you mentioned a set of
properties, so I think you want <loadproperties>, not <property
file=...> - the first will load many properties, the second will load
the contents of the file into one property. If I'm misunderstanding your
situation, ignore the rest of this...

Have you looked at property sets? Perhaps something like this (not

<loadproperties srcFile="file.props" />
<propertyset id="jeff">
   <propertyref prefix="foo" />
<java ...>
   <syspropertyset refid="jeff" />

This assumes that the properties in your file have some common prefix;
if they don't, the manual mentions that you can use a prefix filter
reader. I haven't used these yet, but you can look at the page on
FilterChains & FilterReaders in the manual.

Good luck!


> Anybody know how to achieve this? I'm sure it must be possible.
> Thanks,
> Laurie
> Visit our website at
> This message contains confidential information and is 
> intended only for the individual named.  If you are not the 
> named addressee you should not disseminate, distribute or 
> copy this e-mail.  Please notify the sender immediately by 
> e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secure or 
> error-free as information could be intercepted, corrupted, 
> lost, destroyed, arrive late or incomplete, or contain 
> viruses.  The sender therefore does not accept liability for 
> any errors or omissions in the contents of this message which 
> arise as a result of e-mail transmission.  If verification is 
> required please request a hard-copy version.  This message is 
> provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any 
> securities or related financial instruments.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: For 
> additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message