Build and Version Numbering for Java Projects (ant, cvs, hudson)

后端 未结 9 1038
野的像风
野的像风 2020-11-29 14:38

What are current best-practices for systematic build numbering and version number management in Java projects? Specifically:

  • How to manage build numbers sy

9条回答
  •  旧巷少年郎
    2020-11-29 14:59

    This is how i resolved this:

    • the sources are copied to the build directory
    • then the anttask "versioninfo" is applied
    • compile the modified sources

    Here is the java file storing the version info:

    public class Settings {
    
        public static final String VERSION = "$VERSION$";
        public static final String DATE = "$DATE$";
    
    }
    

    And here is the anttask "versioninfo":

        
        
    
            
            
            
            
                
            
    
            
            
            
    
    
            
            
                
                
            
    
        
    

提交回复
热议问题