aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
493 stars 181 forks source link

[Question] is it possible to use the plugin in a projet with git submodules ? #223

Open vincentlejeune opened 4 years ago

vincentlejeune commented 4 years ago

My project is a multi module maven project. The project has is own git repository. The modules have their own git repositories (git submodules) too. Is the gitflow-maven-plugin able to manage this kind of project ?

aleksandr-m commented 4 years ago

Depends. Why don't you try it and if something doesn't work then post additional info.

vincentlejeune commented 4 years ago

@aleksandr-m thanks for your answer.

Of course I tried first, without success. After a mvn gitflow:release-start, my project repository (that contains the aggregate pom) has switched to the release branch, unfortunatly, the modules inside the project folder (git submodules) didn't switch. They stayed to the development branch.

Is there something wrong in my use case ?

aleksandr-m commented 4 years ago

@vincentlejeune

Is there something wrong in my use case ?

Can you describe what exactly you are expecting to happen with git submodules?

vincentlejeune commented 4 years ago

I have components, each component has it own git repository. To simplify my release process, i would like to release all my components as they were modules of the same multi maven project. To achieve that, i create a multi maven project repository that references my components repository as "git submodules". when i start the release, i expect that all repositories will switch to the release branch. To summarize, i'm expecting that the gitflow plugin will apply the git flow branching workflow to each git submodules and parent instead of only to the parent repository.

aleksandr-m commented 4 years ago

Haven't looked much into this, but it seems too complex. @vincentlejeune Can you even run all the necessary commands for submodules from parent repo? If you would do it manually, which commands would you run. Can you outline at least the basics ones?