Deriving maven artifact version from git branch

前端 未结 7 2059
眼角桃花
眼角桃花 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条回答
  •  盖世英雄少女心
    2020-12-12 11:28

    Have you tried using this plugin?: https://github.com/ktoso/maven-git-commit-id-plugin. You can configure it to generate a properties file with all the relevant info about your repo state:

    • branch
    • describe
    • commitId
    • buildUserName
    • buildUserEmail
    • buildTime
    • commitUserName
    • commitUserEmail
    • commitMessageShort
    • commitMessageFull
    • commitTime

提交回复
热议问题