1

I have started to working at a company where they use the buildNumber concept. They open a release branch, with version set to 1.0.2-build1 for example.

The next time they generate the artifact and deploy it, they increment this number, so 1.0.2-build2.

When the code is ready to deploy to production environment, they eliminate the -buildNumber and a new tag is generated.

If we have the version 1.2.0-build7 and version 1.2.0 with the artifacts generated under Jfrog Artifactory, the last version avaiable is 1.2.0 but Maven with artifactory, if I try to use the versions plugin to update the dependency version from my pom.xml, the plugin understand that the last version is 1.2.0-build7 and not the last tag generated previusly.

Do someone know how to deal with this situation?. I´m struggling with it but without success.

Thanks to all!

Daniel Majano
  • 976
  • 2
  • 10
  • 18
  • You should ideally use SNAPSHOTS, not sure why you would use this specific versioning. – Naman Aug 21 '17 at 08:08
  • We use the gitflow model at this moment. With SNAPSHOTS we manage the versioning of feature branchs. When the feature is finished, we started a release branch without SNAPSHOT and the -BuildNumber concept, the same for hotfix – Daniel Majano Aug 21 '17 at 08:15
  • In Maven we should have 1.2.0-build7 < 1.2.0, as described here https://stackoverflow.com/questions/37871662/how-does-the-central-repository-sort-version-numbers/37875486#37875486 – J Fabian Meier Aug 21 '17 at 11:32
  • Maven understand 1.2.0 and 1.2.0-build7 like releases version. For my client a version with buildNumber is not a final release so i had to include a xml file with one exception to exclude the versions with build using the "rulesUri" configuration from maven plugin versions – Daniel Majano Aug 24 '17 at 09:18

0 Answers0