Chad Woolley wrote:
Does anyone know how to prevent the Ant propertyfile task from randomly rearranging your property file and whacking all the comments?
rm -fr $ANT_HOME
Or alternately, some simple ant/maven based solution that just lets you append a new property to the end of a file? I tried the replaceregexp task, but I'm not good enough with regexp to know how to append to the EOF.I wouldn't have been a bastard with the above reply unless I had some solution :-)
Perhaps you should RTFM :))
I have an ant task that writes a property file based on a prefix.
For a frequent basher of Ant, it might behoove you to know the enemy well:
<project name="propfile"> <property name="hibernate.whatever" value="Drew"/> <echoproperties destfile="hibernate.properties" prefix="hibernate."/> </project>
True that this misses the original point, as does your task, of keeping the comments intact. <echoproperties> also supports the <propertyset>'s, which allow lots of control over which properties are selected, not just by prefix.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]