ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schmetzer <>
Subject Re: Newbie question: importing properties from XML file via command line
Date Fri, 11 Sep 2009 21:09:02 GMT
2009/9/11 Scott Stark <>:
>> Any particular reason you're not using a plain old properties file?
> Also I've noticed you can't "inherit" properties in a properties file. For
> example, this doesn't work:
> projectRoot=C:\\working
> documentSource=${projectRoot}\\documents
> And you can't even use ${file.separator}...
> Scott

That's not correct: ant properties in the file are expanded inline.
See for details
(I don't know about ${file.separator}, though)

The import tag can use property expansion too. If you don't want to
hard-wire the file you import, you can use a propery. e.g.

ant -Dimport-file=test.xml

     <import file="${import-file}"/>


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

View raw message