Search code examples
configurationmaven-2maven-release-plugin

How to configure scm in flat multi-module projects in maven?


I am working with the following project structure

parent
   +-- pom.xml (parent and reactor)
module-1
   +-- pom.xml
module-...
   +-- pom.xml

I would like to be able to do a mvn release:prepare on the parent project and have the resulting war as well as a consistent tag structure in svn.

Right now everything seems to work fine except the tagging of the modules, that is, a mvn release:prepare will tag the parent project but none of the child projects. I have already found and tried the switch commitByProject in the configuration of the parent-pom. I have entered and removed scm configurations in the moduel-poms, I have tried configuring the release-plugin in the module-poms all to no avail. The release-step never asks me for a tagname for any of the modules and consequently does not create a tag later on in the project.

How do I configure parent and module such that a mvn release:prepare will tag the modules?


Solution

  • After further, countless hours of searching I no longer assume, it is possible to tag each module independent from the others using the maven release plugin.

    I have found (and lost) an explicit comment, that this is not possible with the release plugin and there are further hints, for example, that the release plugin only accepts exactly one scm tag in non-interactive mode.

    As I'm a Java developer, not a maven developer I refuse to change my package structure and thus am stuck with doing the tagging by hand.