Remove -SNAPSHOT from project version in pom

后端 未结 4 1536
梦如初夏
梦如初夏 2020-12-29 04:08

I have a pom with the following GAV

com.company.services
test-branch-2
1.0         


        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 04:54

    Similar to A_Di-Matteo's approach with build-helper, but without the need for additional plugins configuration:

     mvn build-helper:parse-version versions:set \
         -DnewVersion=\${parsedVersion.majorVersion} \
             .\${parsedVersion.minorVersion} \
             .\${parsedVersion.incrementalVersion \
             .\${parsedVersion.buildNumber} \
          versions:commit
    

    This will replace your 1.0.0.0-SNAPSHOT with 1.0.0.0 in the pom.xml.

提交回复
热议问题