How to use the extension mechansim of jgitflow

Looking in the code of JGitFlow there seems to be some extension mechanism. With this mechanism some pre/post hooks can be implemented for releaseStart/teleaseFinish, featureStart/featureFinish etc.  in user defined classes. These classes can than be  providided with their FQCN in the pom.xml file. In the API jar there are some interface classes defined.

This is a quite undocumented feature (only what I could find was https://jgitflow.bitbucket.io/release-finish-mojo.html#releaseFinishExtension)

I like to know how to use this feature:

* How to implement such a class (do I need to sepcify some annotations)
* How exactly should I refer from the pom file to the class-file(s)

It would be nice to have a a working example.

 

Background:

We have a huge maven submodule project (>100 submodules) When we create a feature branch we need a unique version name in so that the artifacts in the feature-branch have a different version as the develop branch. This is achieved by setting the enableFeatureVersion to true.

This means that all pom files are updated. When a pull request is done to develop and a code review has to be done before featureFinish, we see >100 pom files which are changed. This clobbers the overview of the actual change.

To prevent this we have set the version as a property in the parent pom. But the enableFeatureVersion does not adapt the version-property but the version itself (and al the versions in the child poms). Our thoughts where to set enableFeatureVersion to false and to change the version-property with a post-featureStart hook and to reset it with a pre-featurefinish hook.

 

Thanks in advance,

Regards,
Erjan

 

 

 

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

71 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you