maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Burch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MRELEASE-942) scm.url in release.properties incorrectly has project name appended if not defined in the top level pom
Date Wed, 17 Feb 2016 18:04:18 GMT
Nick Burch created MRELEASE-942:
-----------------------------------

             Summary: scm.url in release.properties incorrectly has project name appended
if not defined in the top level pom
                 Key: MRELEASE-942
                 URL: https://issues.apache.org/jira/browse/MRELEASE-942
             Project: Maven Release Plugin
          Issue Type: Bug
          Components: scm
    Affects Versions: 2.5.3
            Reporter: Nick Burch


This one has 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:

{code}
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
{code}

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 be the 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:
{code}
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
{code}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message