title: Asking user for yes|no input
body: <p>I am working on an Ant build process for an application that uses a versioning in the following format: major.minor.buildcount.  So currently the application is around 2.1.52, where we are on version 2.1 and there have been 35 builds.</p>
  
  <p>I am now adding in an ant target to ask the user if they would like to advance the major version and/or the minor version.</p>
  
  <p>When I run my target from the command line I would like to follow the following:</p>
  
  <pre><code>@@ ant version
  Versioning application...
  Would you like to advance the major version to 3? (Y|n)
  @@ n
  Not Advancing major version
  Would you like to advance the minor version to 2? (y|N)
  @@ y
  Advancing minor version
  </code></pre>
  
  <p>The lines prepended with @@ is the user input that I would like to take.  My major and minor versions are stored in a build.properties file.</p>
  
  <p>Here is my code so far</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project name="StudentMS" default="zip" basedir="."&gt;
      &lt;propertyfile file="./.ant/build.properties"&gt;
          &lt;entry key="version.buildnumber" type="int" default="0" operation="+" pattern="00" /&gt;
      &lt;/propertyfile&gt;
  
      &lt;property file="./.ant/build.properties" /&gt;
      &lt;property name="sourceDir" location="/Users/dave/Workspace/ColdFusion/StudentMs" /&gt;
      &lt;property name="buildDir" location="${sourceDir}/builds" /&gt;
  
      &lt;target name="version" description="Adds a major and minor version to the build."&gt;
          &lt;input message="Advance major version? ${version.major}" addproperty="updatemajor" validargs="y,n" defaultvalue="n" /&gt;
          &lt;propertyfile file="./.ant/build.properties"&gt;
              &lt;entry key="version.major" type="int" default="0" operation="+" pattern="00" /&gt;
          &lt;/propertyfile&gt;
  
          &lt;input message="Advance minor version? ${version.minor}" addproperty="updateminor" validargs="y,n" defaultvalue="y" /&gt;
          &lt;propertyfile file="./.ant/build.properties"&gt;
              &lt;entry key="version.minor" type="int" default="0" operation="+" pattern="00" /&gt;
          &lt;/propertyfile&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And my build.properties</p>
  
  <pre><code>#Tue, 29 Mar 2011 11:46:30 -0400
  version.buildnumber=35
  version.major=2
  version.minor=1
  </code></pre>
  
  <p>I am still very new to Ant so I am sorry that I can't post more advanced code.  So the first thing I need to do is add some kind of conditional around my property file edits.</p>