ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: propertyfile task issues
Date Wed, 30 Nov 2011 21:47:12 GMT
On 2011-11-30, Eric Fetzer wrote:

> I'm lost Stefan. It's a java properties file, but doesn't have the :
> escaped when I check it out. Once I run "propertyfile" on it, it
> decides to change it because it knows better than my developers?

I wouldn't state it that way, but yes.  8-)

Running propertyfile on it will ensure it is a syntactically correct
Java property file.

See the documentation of Properties#load.  Strictly speaking ':' has to
be escaped in keys or the first character of values only - if all
implementations worked properly.

> This is for Flash Flex, so maybe the properties files are
> different?

No idea.  Ant is making sure the file can be read correctly by
Properties#load, that's what the task has been written for.

> I'm not sure but this doesn't seem right to me. In my opinion, Ant
> should ONLY change the things I tell it to change.

Ant also fixes broken MANIFEST.MF files, for example.

It is quite possible you'd get the same sort of escaping if you load the
file with Properties#load and write it back with Properties#store
outside of Ant as well.  This is what you'd get if you set the
jdkproperties attribute on the task to true (requires Ant 1.8.x).  Using
Ant 1.7.x this is what actually happens - i.e. it isn't even Ant that is
escaping the colons in your files.


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

View raw message