[
https://issues.apache.org/jira/browse/SCM-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961492#comment-17961492
]
ASF GitHub Bot commented on SCM-442:
------------------------------------
jira-importer opened a new issue, #651:
URL: https://github.com/apache/maven-scm/issues/651
**[Petter
Måhlén](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=petterm)**
opened
**[SCM-442](https://issues.apache.org/jira/browse/SCM-442?redirect=false)** and
commented
We have a parent corporate POM that is not in the parent folder of each
project. When running release:perform, the correct (as specified) GIT SCM URL
is not used, but instead a URL is created by appending the Maven artifact name
to the SCM URL of the parent corporate POM project. Which doesn't make sense at
all to me:
1. There is no requirement (and in fact bad practice in a lot of cases) that
the POM hierarchy should map exactly to the folder hierarchy. So a parent POM
doesn't have to reside in a parent directory.
2. There is no requirement (but maybe good practice) to have folder names in
SCM be the same as the artifact names. In our case, we have a bad artifact name
that we want to keep so as not to have to modify a lot of POMs, but we wanted a
clearer repository name for the new Git repository.
This is the error message from the 'mvn release:perform' command.
INFO] Executing: /bin/sh -c cd
/Users/pettermahlen/git/sponsoredlinks-client/target && git clone
git://git.shopzilla.com/java/common.mvn.git/slg_client
/Users/pettermahlen/git/sponsoredlinks-client/target/checkout
[INFO] Working directory:
/Users/pettermahlen/git/sponsoredlinks-client/target
[ERROR] The git-clone command failed.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
fatal: The remote end hung up unexpectedly
The SCM configuration from the 'slg_client' pom.xml is;
\<scm>
\<connection>scm:git:git://git.shopzilla.com/site/client/sponsoredlinks-client\</connection>
\</scm>
The workaround that I have found is to manually edit the release.properties
file and change to using the correct SCM URL.
---
**Affects:** 1.1
> Incorrect SCM URL constructed when using parent POM that is not in the parent
> directory
> ---------------------------------------------------------------------------------------
>
> Key: SCM-442
> URL: https://issues.apache.org/jira/browse/SCM-442
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-gitexe
> Affects Versions: 1.1
> Reporter: Petter Måhlén
> Assignee: Olivier Lamy
> Priority: Major
>
> We have a parent corporate POM that is not in the parent folder of each
> project. When running release:perform, the correct (as specified) GIT SCM URL
> is not used, but instead a URL is created by appending the Maven artifact
> name to the SCM URL of the parent corporate POM project. Which doesn't make
> sense at all to me:
> 1. There is no requirement (and in fact bad practice in a lot of cases) that
> the POM hierarchy should map exactly to the folder hierarchy. So a parent POM
> doesn't have to reside in a parent directory.
> 2. There is no requirement (but maybe good practice) to have folder names in
> SCM be the same as the artifact names. In our case, we have a bad artifact
> name that we want to keep so as not to have to modify a lot of POMs, but we
> wanted a clearer repository name for the new Git repository.
> This is the error message from the 'mvn release:perform' command.
> INFO] Executing: /bin/sh -c cd
> /Users/pettermahlen/git/sponsoredlinks-client/target && git clone
> git://git.shopzilla.com/java/common.mvn.git/slg_client
> /Users/pettermahlen/git/sponsoredlinks-client/target/checkout
> [INFO] Working directory: /Users/pettermahlen/git/sponsoredlinks-client/target
> [ERROR] The git-clone command failed.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Unable to checkout from SCM
> Provider message:
> The git-clone command failed.
> Command output:
> fatal: The remote end hung up unexpectedly
> The SCM configuration from the 'slg_client' pom.xml is;
> <scm>
>
> <connection>scm:git:git://git.shopzilla.com/site/client/sponsoredlinks-client</connection>
> </scm>
> The workaround that I have found is to manually edit the release.properties
> file and change to using the correct SCM URL.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)