How to handle submodules with Maven JGit Flow?

2k Views Asked by At

I am new to using the jgitflow-maven-plugin. My project has many different modules that depend on each other. On my develop branch all the submodules have version 1.0.0-SNAPSHOT.

Executing the release-start goal fails because of the snapshot dependencies. I found that I can use the allowSnapshots=true option to get past this, but I'm not sure if this is the correct way of dealing with it.

What is the correct way of working with jgitflow and submodules?

2

There are 2 best solutions below

0
On

Is

<configuration>
    <!-- Keep your maven submodules at the same version as the parent POM -->
    <autoVersionSubmodules>true</autoVersionSubmodules>
    ...
</configuration>

from http://george-stathis.com/2013/11/09/painless-maven-project-releases-with-maven-gitflow-plugin/

0
On

As of right now, allowSnapshots=true is required to build a project with submodules that duplicate the parent's (SNAPSHOT) version. Your usage is correct.