[MRELEASE-885] When the base pom is a subdirectory, tagging fails in GIT
- Dominant language
- Java
- Stars
- 128
- Forks
- 145
- Avg merge
- 7h 7m
- Merged PRs (30d)
- 3
Description
**[Bradley Baetz](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bbaetz)** opened **[MRELEASE-885](https://issues.apache.org/jira/browse/MRELEASE-885?redirect=false)** and commented
(NOTE, this is not the same as MRELEA[SE-875](https://issues.apache.org/jira/browse/SE-875). I think)
Given a GIT checkout with a project structure of:
project/
dir1/pom.xml
dir2/pom.xml
Given an \ config of:
\scm:git:ssh://git@github.com:bbaetz/maven-release-bug.git\
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://git@github.com: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
---
**Affects:** 2.3.2, 2.5
**Issue Links:**
- [MRELEASE-875](https://issues.apache.org/jira/browse/MRELEASE-875) release:prepare does not commit pom.xml if not in the git root
(_**"duplicates"**_)
- [MRELEASE-942](https://issues.apache.org/jira/browse/MRELEASE-942) scm.url in release.properties incorrectly has project name appended if not defined in the top level pom
(_**"is duplicated by"**_)
2 votes, 6 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reproduced command using build/pom.xml and the release:prepare release:perform goals, then inspect the Git tagging path that produces the shown git push command. Verify the base-pom subdirectory is preserved in the Git URL and confirm the release tag succeeds for the provided project structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100