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

后端 未结 9 1056
野的像风
野的像风 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 15:05

    I'm using Hudson also, although a far more simpler scenario:

    My Ant script has a target in it that looks like:

    
        
        Build: ${env.BUILD_TAG}, Id: ${env.BUILD_ID}, URL: ${env.HUDSON_URL}
    
    

    Hudson sets these environment variables for me whenever my job runs.

    In my case, this project is a webapp and I'm including this build-number.txt file in the root folder of the webapp - I don't really care who sees it.

    We don't tag source control when this is done because we already have our Hudson job set up to tag it with the build number/timestamp when the build is successful.

    My solution only covers the incremental build numbers for development, we haven't gotten far enough in the project where we are covering release numbers yet.

提交回复
热议问题