0

The issue is known to many maven based projects using feature branches. In maven, there is no concept of a branch. Now in a git-flow environment there are basically 2 ways to deal with the build artifacts:

  1. modify the version number to something like "featureX-1.0.0-SNAPSHOT".
  2. Separate the SNAPSHOT repositories to get an isolated build and dev environment. Use a maven extension to determine the branch and select the proper repositories early in the process.

Variants of the two seem to exist, but both have its drawbacks. We would like to go in our team to option 2 and share the pipelines to publish maven artifacts to separate package feeds.

Is there any way to automate the creation of package feeds on the event of a git branch creation?

marcomeyer
  • 178
  • 7
  • I would suggest to take a look here: https://maven.apache.org/maven-ci-friendly.html – khmarbaise Sep 17 '18 at 14:19
  • Wow, thank you for the tip. I completely missed that new possibility with maven 3.5. That looks like we can integrate the branch info via property into the version number. If that is really gonna work by passing it via command line, that would indeed solve my issue. – marcomeyer Sep 18 '18 at 20:49

0 Answers0