ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Shadel <shade...@mtc.byu.edu>
Subject Filter task w/ properties file
Date Tue, 11 Sep 2001 19:50:22 GMT
I want to replace these lines in my build.xml :

		<filter token="VERSION_MAJOR" value="${version.major}" />
		<filter token="VERSION_MINOR" value="${version.minor}" />
		<filter token="BUILD_NUMBER" value="${version.buildnum}" />

with a file (filter.properties) like this:

VERSION_MAJOR=${version.major}
VERSION_MINOR=${version.minor}
BUILD_NUMBER=${version.buildnum}

and place this in my build.xml:

		<filter filtersfile="filter.properties" />

But the problem is that the Filter task (more specifically the FilterSet object to which it
delegates file loading) doesn't replace the ${} property references with the project's values
for those properties.  Instead it leaves the full string and ${} in when it filters the files
during copy.  

If I can pull similar filters out of my build file I believe that would definitely make it
MORE readable, but it's not worth it if I can't have access to the project's properties. 
Is there a particular reason it's not done this way, and a workaround to accomplish the same
thing?  Or has it just not made it in to the feature set yet?

Thanks,

Tim


Mime
View raw message