Automatically increase the build number in the Java project
I am using a version system represented by abbuild, where a is the overall Version (the prototype is alpha, the beta version is 0, and the major version is 1), B is the milestone Version (along the representative prototype, alpha, beta phase) and the build represents the number of times the project has been compiled
At present, I read the application from the text file, increase the number, and save it to the text file using the debug flag setting when the application is running
I'm looking for a more "correct" way to use Java and NetBeans Is there any way I can inject a build numberer into the build process? It is better to save the quantity in the source file attached to the project rather than relying on the existence of nearby files
Solution
Here is how to use Maven:
Edit
Since the link published 3 years ago is broken, other links can help: http://blog.codehangover.com/track-every-build-number-with-maven/ https://blog.codecentric.de/en/2015/04/increment-versions-maven-build-helper-versions-plugin/