I\'m using the propertyfile task shown below in my build script:
If you need to put a single property in a file just use echo:
<echo output="somefiles.properties">lastmodified=${lastmodified}</echo>
This isn't a great solution, but how about removing the comment all together?
<target name="build-brand" depends="-init" description="Adds version information to branding files.">
<propertyfile file="${basedir}/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties">
<entry key="currentVersion" value="${app.windowtitle} ${app.version}" />
</propertyfile>
<replaceregexp file="${basedir}/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties" match="^#.*\n" replace=""/>
</target>
Try: <propertyfile file="..." comment="">
Edit: Which probably won't work :(. It looks like the culprit is actually Properties.store(OutputStream, String):
Next, a comment line is always written, consisting of an ASCII # character, the current date and time (as if produced by the toString method of Date for the current time), and a line separator as generated by the Writer.