XmlProperty is perfect to read an xml well formed file (from an Ant task)?
But how to read a non XML one? More precisely, How To Read a pattern from a non XML file ?
XmlProperty is perfect to read an xml well formed file (from an Ant task)?
But how to read a non XML one? More precisely, How To Read a pattern from a non XML file ?
You can read a .properties file using file
option to the property
task.
Check out the LoadFile task. It allows you to load a file into an ant property that you can then access from other tasks. The LoadFile tasks also supports filters/filter chains, so you can do things like read the first 5 lines of the file into the property or read lines that only contain certain words, etc...