[ 
https://issues.apache.org/jira/browse/MRELEASE-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16142608#comment-16142608
 ] 

Gruust edited comment on MRELEASE-885 at 8/26/17 4:45 AM:
----------------------------------------------------------

I can confirm a similar issue, When I try to do a release from a git repository 
clone's sub folder, ie. "/abc", the release plugin changes the 
developerConnection from "...:repo.git" to "...:repo.git/abc" which is 
obviously nonsensical. This happens at the end of "mvn release:prepare" when it 
tries to push the tag refs. This only happened when using a parent pom. The 
parent pom is from the same git repository, but the project has no parent path 
set.

As a solution, I simply disabled the pushChanges option for the release plugin 
and to a manual "git push --tags" instead.


was (Author: gruust):
I can confirm a similar issue, When I try to do a release from a git repository 
clone's sub folder, ie. "/abc", the release plugin changes the 
developerConnection from "...:repo.git" to "...:repo.git/abc" which is 
obviously nonsensical. This happens at the end of "mvn release:prepare" when it 
tries to push the tag refs. This only happened when using a parent pom. The 
parent pom is from the same git repository, but the project has no parent path 
set.

https://github.com/jjYBdx4IL/misc/tree/master/release-parent  <-- published 
without problem

https://github.com/jjYBdx4IL/misc/tree/master/encryption-utils <-- uses 
release-parent as parent, fails to release

> When the base pom is a subdirectory, tagging fails in GIT
> ---------------------------------------------------------
>
>                 Key: MRELEASE-885
>                 URL: https://issues.apache.org/jira/browse/MRELEASE-885
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: Git, scm
>    Affects Versions: 2.3.2, 2.5
>         Environment: linux (fedora 20)
>            Reporter: Bradley Baetz
>             Fix For: 2.5.1
>
>
> (NOTE, this is not the same as MRELEASE-875. I think)
> Given a GIT checkout with a project structure of:
> project/
>   dir1/pom.xml
>   dir2/pom.xml
> Given an <scm> config of:
> <developerConnection>scm:git:ssh://[email protected]:bbaetz/maven-release-bug.git</developerConnection>
> the maven-release plugin correctly commits the pom file, but fails to tag. 
> The problem is that its stripping off one level of the URL, and doing:
> [INFO] Executing: /bin/sh -c cd /home/bbaetz/src/subdir-project && git push 
> ssh://[email protected]:bbaetz refs/tags/project-1.0.0
> which is wrong for git
> To reproduce, fork https://github.com/bbaetz/maven-release-bug/, change the 
> scm settings to your own, and run:
> mvn -X -B -f build/pom.xml -DdevelopmentVersion=1.0.1-SNAPSHOT 
> -DreleaseVersion=1.0.0 -Dresume=false release:prepare release:perform
> I've tried various combinations of maven-release-plugin and maven-scm-plugin 
> versions, with no luck



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to