D.B.
D.B.

Reputation: 4713

Using Maven scm:checkin to commit changes to module projects

I have a multi-module POM file:

...
<modules>
   <module>../project1</module>
   <module>../project2</module>
   <module>../project3</module>
   ...
</modules>
...

Each of the modules is itself a Maven project with its own POM. Inside each of these POMs I have the scm tag defined with the developerConnection specified like this:

<scm>
   <developerConnection>scm:svn:svn://hostname:port/path/to/trunk</developerConnection>
</scm>

My goal is to run the following Maven goals/options:

versions:update-parent versions:commit scm:checkin \
  -Dmessage="automated commit" -Dusername=user -Dpassword=pass

My expected results are:

  1. The parent of each module's POM is updated to the latest released version.
  2. The changes to each POM would be checked in to the SVN path specified in the POM for the module. E.g. project1 POM checked in using project1 <scm>/<developerConnection> path, project2 checked in using project2 path, etc.

Actual Results:

  1. The parent of each module's POM is updated to latest released version. This works as expected.
  2. Only the multi-module POM is checked in to SVN, none of the module POMs are checked in. This is the problem.

Is there a way to achieve the expected results above or is this something that the SCM plugin simply was not designed to do? If it is possible, how would I modify what I have in order to get the results I want?

Note: I can't change the project structure - I can't put the modules inside of the parent project, they have to remain separate.

Not sure if it's relevant but I'm using Maven 3.3.9.

Upvotes: 3

Views: 2270

Answers (0)

Related Questions