maven-buildnumber-plugin svn revision available only when not using format

前端 未结 4 1422
后悔当初
后悔当初 2021-01-02 08:31

While using the maven-buildnumber-plugin 1.0 beta 4, it seems that I can get the svn revision unless I use a tag within the configuration. Once

4条回答
  •  迷失自我
    2021-01-02 08:44

    I did run into the same problem and for a few moments I thought the solution suggested by @Jean-Rémy Revy works..but it didn't for some reason.

    It turns out that in buildnumber-maven-plugin-1.2 they have added support for a special property called scmVersion. As of now v1.2 is not available in the maven repository though the plugin's website suggests it is GA. So you will need to checkout the source (http://svn.codehaus.org/mojo/tags/buildnumber-maven-plugin-1.2/ )and build it ( $ mvn install ). This will also install the plugin in your local repository.

    After this just do this:

    
        org.codehaus.mojo
        buildnumber-maven-plugin
        1.2
        
            
                    validate
                
                    create
                
            
        
        
            {0,date,yyyy-MM-dd HH:mm:ss}.{1}
                
                    timestamp
                    scmVersion
                
            
    
    
    

提交回复
热议问题