5

We have a problem with the maven-release-plugin with git and maven-modules.

We have the following project structure:

pom.xml(ApplicationTest and ApplicationConf are modules)

ApplicationWeb

---pom.xml(parent pom in root folder)

ApplicationTest

---pom.xml(parent pom in root folder)

ApplicationConf

---pom.xml(All environments are modules. This has no parent pom)

---ConfDev

-------pom.xml(parent ApplicationConf)

---ConfTst

-------pom.xml(parent ApplicationConf)

---ConfAcc

-------pom.xml(parent ApplicationConf)

---ConfPrd

-------pom.xml(parent ApplicationConf)

Now we like to release the dev config(Parent already released). This by perform maven release on the ApplicationConf/ConfDev/pom.xml.

Now the release prepare fails because it uses the wrong git url when it want's to push the changed made. It attaches the artifact id of the pom we like to release to the git url.

http://gitrepourl/git_repo.git/artifact-id

We defined the scm settings in the pom in ApplicationConf so the root of all the environments.

<scm>
  <developerConnection>scm:git:http://gitrepourl/git_repo.git</developerConnection>
</scm>

Do we have a wrong project structure, wrong setting or is this a bug in the maven-release-plugin?

Version used:

maven-release-plugin 2.3.2 and 2.4.1

Maven 3.0.5

Possible solution:

Removed all config project as module from the config parent pom and added to every pom more scm info so it looks like this:

<scm>
<url>https://github.com/XXX/YYY</url>
<connection>scm:git:ssh://git@github.com/XXX/YYY.git</connection>
<developerConnection>scm:git:ssh://git@github.com/XXX/YYY.git</developerConnection>

Now I am able to perform a release on every pom. Is this the right sollution?

sezlem
  • 51
  • 2

1 Answers1

0

Maven adds automatically the submodul artifactId to the scm/connection-URLs. To fix it, you have to duplicate the scm-Node from the parent to every submodule.

mmoossen
  • 1,237
  • 3
  • 21
  • 32