Build version number for web applications [war]?

How to save my version number for a military file?

in ant, in maven?

Is there a way to simplify things?

Also, how to save the change log? [that is, so that the version number can determine how the newer version has changed since the last build]?

+4
source share
4 answers

We manage release numbers at Maven. Then we use the maven release plugin to increase version numbers when we need to free. This tool also ensures that changes are noted in SVN. See: http://maven.apache.org/plugins/maven-release-plugin/index.html

When you release using this tool, the following steps are taken:

  • Make sure that there are no uncommitted changes in the sources.
  • Make sure there are no SNAPSHOT dependencies
  • Change the version in the POM from x-SNAPSHOT to the new version (you will be asked to use versions)
  • Convert SCM information to POM to include the final destination of the tag
  • Run project tests with modified POMs to confirm that everything is operational
  • Commit Modified POM
  • Mark the code in SCM with the version name (this will be suggested)
  • Configure the version in the POM to the new y-SNAPSHOT value (these values ​​will also be requested)
  • Commit Modified POM

These steps are sufficient for most release processes.

+3
source

I use SVN, so I have access to all the changes, as well as a global command version for the whole team (this version of svn commit).

+1
source

ANT has a buildnumber task and Maven a build number , but ideally you would need to set up a continuous integration environment that manages your builds. There are some good continuous integration servers, I personally really like working with Hudson . You want to synchronize your continuous build server with your version control system. Each version control system is slightly different from each other, but they should all have a way of marking or versioning your source. Hudson (like other continuous integration servers) has a number of plugins that you can install for various tasks, including a control source

+1
source

Ivy has a buildnumber that calculates the build number from modules already published to your repository.

0
source

Source: https://habr.com/ru/post/1311175/


All Articles