Thanks Matt, I certainly see the problem. I decided to take the path of least resistance, but I left myself an note to revisit it later... I had a need to copy in certain files when doing a production build, and certain others for a development build. So all I wound up doing was have a set_development and set_production target, and the set_production target on executes if the is_production property is defined (set_development always executes). I put the comment in the build.xml file, rather than the properties file.
Not perfect, but it was quick and easy and does what I need. It was only three files, so not a nightmare in any case. I'll make it more elegant later :) Thanks to everyone that responded! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, February 28, 2005 1:33 pm, Matt Benson said: > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: > [SNIP] >> So, is there a way to get this task... >> >> <propertyfile file="build.properties"> >> <entry key="build_number" default="0" type="int" >> operation="+" value="1" >> pattern="0000" /> >> </propertyfile> >> >> To NOT wipe out my comments? Thanks again, I'm >> learning alot :) > > According to its doc, this task makes no effort to > preserve comments. If you are familiar with the > javadoc on the Properties class it doesn't take much > of a leap to conclude that these are the facilities > being used "under the hood", as it were. So the > propertyfile task will inherit the limitations of the > Properties class. You could implement this yourself > in Ant... I would think you might find yourself using > ant-contrib's math task as well as one of the several > text replacement approaches available in Ant (my > favorite is filterchains). Or you could always > implement in Java or a compatible scripting language. > > -Matt > >> >> -- >> Frank W. Zammetti >> Founder and Chief Software Architect >> Omnytex Technologies >> http://www.omnytex.com >> >> On Mon, February 28, 2005 1:07 pm, Matt Benson said: >> > >> > --- "Frank W. Zammetti" <[EMAIL PROTECTED]> >> wrote: >> >> Is it possible, and if so how, to do >> conditionals? >> >> I'd like to have a way >> >> basically on each task to say "if property >> A=value1, >> >> then run this task, >> >> otherwise don't". I'm looking through the manual >> >> now but haven't come >> >> across what seems to fit the bill. >> > >> > As others have suggested, you can use >> ant-contrib's if >> > task. However, the "Ant way" to do this is >> described >> > in the manual: >> > http://ant.apache.org/manual/using.html#buildfile >> > >> > HTH, >> > Matt >> > >> > __________________________________________________ >> > Do You Yahoo!? >> > Tired of spam? Yahoo! Mail has the best spam >> protection around >> > http://mail.yahoo.com >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> > For additional commands, e-mail: >> [EMAIL PROTECTED] >> > >> > >> >> >> > --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]