title: Automatically incrementing a build number in a Java project
body: <p>I'm using a versioning system that is represented by a.b.build where a is the overall version (will be 0 for prototype, alpha and beta versions, 1 for major release), b is the milestone version (along the lines of representing the proto, alpha, beta stages) and build represents literally the amount of times the project has been compiled.</p>
  
  <p>At the moment, I have the app read from a text file, increment the number, and save to a text file when the app is run with a debug flag set.</p>
  
  <p>I'm looking for a more "correct" way to do this using Java and Netbeans. Is there some way I can inject a build numberer into the build process somewhere? preferably saving the number into a source file that is shipped with the project - instead of relying on the existence of a nearby file.</p>