project version from maven to sonar using hudson

前端 未结 5 718
情话喂你
情话喂你 2021-01-16 20:37

i am using maven2 , hudson and sonar while doing sonar analysis - i would like some way to append the Hudson build# to the maven version of the project

The project

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-16 20:45

    You can use this Jenkins feature: https://github.com/jenkinsci/jenkins/pull/933/files

    Basically you can access env variables at build, mapped by Jenkins from Maven GAV info

    • POM_DISPLAYNAME
    • POM_DISPLAYNAME
    • POM_VERSION
    • POM_GROUPID
    • POM_ARTIFACTID
    • POM_PACKAGING
    • POM_RELATIVEPATH

提交回复
热议问题