简体   繁体   中英

Maintain Build Version Number for GWT Web Application

I am working on GWT application. I want to maintain the version number for all major buid of my application and have defined version number say as example (1.0.1 changes to 1.0.1.1 or 1.0.2 etc.). I want to show the version number on my about page.

I have read about ant and maven where Build version number can be maintained, but my current GWT project is not maintained with ant or maven like tools, I am using GWT compile.

I want to know, how I will be able to maintain buid version number in GWT web applications, so I can use it to show in my about page (Without changing the name of war file).

Please suggest or provide references to find solution.

You can create version class with constants for version values and use in GWT application. Use the class also on server side for dynamic pages or to check if the GWT application has correct version.

Any time you compile release just increase one of the values. Later you can automate it with ant script and generate this class just before compilation (fe using ant variable or Jenkins version number variable).

 public class Version {
    public static final int MAJOR_VERSION = 1;
    public static final int MINOR_VERSION = 2;
    public static final int BUILD_NUMBER = 123456;
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM