Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.5.3
-
None
-
None
Description
This one stumped me for a while, and I believe it's incorrect behaviour. The project I'm see it on is https://github.com/Gagravarr/VorbisJava
My project structure is:
pom.xml -> depends on parent, defines modules
parent/pom.xml -> defines plugins, and defines scm details
When pom.xml has no scm details in it, and you do a "mvn release:prepare", the release.properties file will be created with the following scm-related entries:
project.scm.org.gagravarr\:vorbis-java-parent.developerConnection=scm\:git\:https\://gagravarr@github.com/Gagravarr/VorbisJava.git project.scm.org.gagravarr\:vorbis-java-parent.url=https\://github.com/Gagravarr/VorbisJava project.scm.org.gagravarr\:vorbis-java.connection=scm\:git\:https\://github.com/Gagravarr/VorbisJava project.scm.org.gagravarr\:vorbis-java-parent.connection=scm\:git\:git@github.com\:Gagravarr/VorbisJava.git scm.url=scm\:git\:https\://gagravarr@github.com/Gagravarr/VorbisJava.git/vorbis-java
The key issue there is that the overall project name vorbis-java has been appended to the scm.url (only), which makes it no longer a valid URL, so the prepare fails as it can't push the tag
If I duplicate the scm details in both the root pom and the parent pom, then the release.properties is generated as expected:
project.scm.org.gagravarr\:vorbis-java-parent.developerConnection=scm\:git\:https\://gagravarr@github.com/Gagravarr/VorbisJava.git project.scm.org.gagravarr\:vorbis-java-parent.url=https\://github.com/Gagravarr/VorbisJava project.scm.org.gagravarr\:vorbis-java.connection=scm\:git\:https\://github.com/Gagravarr/VorbisJava project.scm.org.gagravarr\:vorbis-java.developerConnection=scm\:git\:https\://gagravarr@github.com/Gagravarr/VorbisJava.git project.scm.org.gagravarr\:vorbis-java-parent.connection=scm\:git\:git@github.com\:Gagravarr/VorbisJava.git scm.url=scm\:git\:https\://gagravarr@github.com/Gagravarr/VorbisJava.git
In this second case, the project name is correctly missing from scm.url and so is valid, so the prepare works
All the projects are in the same git repo, and all projects extend from the parent, so that seems to me to be the right place to define the scm details. However, doing so causes Maven to incorrectly go and suffix the valid git URL with the project name, breaking things. Note that only the scm.url is generated incorrectly in this case, the project.scm.* ones are correct
Attachments
Attachments
Issue Links
- duplicates
-
MRELEASE-885 When the base pom is a subdirectory, tagging fails in GIT
- Reopened
- is duplicated by
-
MRELEASE-1137 git path suffix from submodule
- Closed