-----Urspr�ngliche Nachricht-----
Von: Denis Balazuc [mailto:[EMAIL PROTECTED]
Gesendet am: Donnerstag, 22. M�rz 2001 16:25
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: Ant-Optional package - PropertyFile

Hi

I'm using Ant and the optional package.
I have made a build file using the PropertyFile task. However, it is
critical for me to keep the property files user-friendly and moreover, keep
the order of properties as well as user comments and blank lines.

I've seen from Ant's main branch (CVS) that people is planning a more
"user-friendly" version of PropertyFile.
Starting from your version, I've made my own version (basically, wrapping
new classes that handle the property file), which is attached with this
e-mail.
As I'm not a CVS expert and do know the exact process to check things in
into Ant's main branch, I leave you the choice of merging this file with the
existing PropertyFile.java source (you might not even like it anyway ;-))

There's a little thing that isn't implemented : comments "ala"
Properties.store(). (the comments from the build file are supported though)

I have also noticed that properties (${MyProp}) that are not set in the Ant
project get written "as is" in the property file, but I think the task
should throw a BuildException if the property is not set (because it may
lead to overwriting a user file with invalid values ...)

Thanks for reading.
Let me know about your thoughts ;-)

Denis Balazuc
[EMAIL PROTECTED]



Attachment: PropertyFile2.java
Description: Binary data

Reply via email to