Deriving maven artifact version from git branch

前端 未结 7 2042
眼角桃花
眼角桃花 2020-12-12 11:07

We have a workflow requirement that essentially mean that we need to have the artifact version of a module externally defined from the current branch in git.

I.e. if

7条回答
  •  萌比男神i
    2020-12-12 11:32

    If it is sufficient to set the git tag and version information in the artifact file name, you can use maven-jgit-buildnumber-plugin:

    
      ${artifactId}-${git.buildnumber}
      
        
          ru.concerteza.buildnumber
          maven-jgit-buildnumber-plugin
          1.2.7
          
            
              git-buildnumber
              
                extract-buildnumber
              
              prepare-package
            
          
        
        
      
    
    

提交回复
热议问题