We needed to release one of our C++ projects hosted on our github enterprise. This project uses another project as a dependency, added as a git module.

We were able to build this project using maven clean install. Everything was going smoothly until we decided to use Maven release plugin to release this project.

What we found is that Maven release plugin does not clone the dependent submodule. We had gone through official documentation of the Maven release plugin but do not find anything that makes it work with submodule.

Workaround:

What we did as a workaround is that we used Exec Maven Plugin. We added this plugin with the following configurations just inside build->plugins node.

How do you guys do this with your projects with multiple submodules? Please share your thoughts through comments.

--

--