maven-release
maven-release copied to clipboard
MRELEASE-1072 reuse original tag for next development version in case
https://issues.apache.org/jira/browse/MRELEASE-1072 translator does not support resolving
Following this checklist to help us incorporate your contribution quickly and easily:
- [x] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [x] Each commit in the pull request should have a meaningful subject line and body.
- [x] Format the pull request title like
[MJAVADOC-XXX] - Fixes bug in ApproximateQuantiles, where you replaceMJAVADOC-XXXwith the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Run
mvn clean verify -Prun-itsto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.
- [x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
Will look into this as soon as my other open PRs are merged. @kwin Please ping me by ned of next week.
This causes failures with master:
[ERROR] RewritePomsForDevelopmentPhaseTest.testRewriteBasicPomWithGitFromTag:292->AbstractReleaseTestCase.comparePomFiles:248->AbstractReleaseTestCase.comparePomFiles:254->AbstractReleaseTestCase.comparePomFiles:271->AbstractReleaseTestCase.comparePomFiles:287->AbstractReleaseTestCase.comparePomFiles:350 Check the transformed POM D:\Entwicklung\Projekte\maven-release\maven-release-manager\target\test-classes\projects\rewrite-for-development\basic-pom-with-git-from-tag\pom.xml
Expected text value 'original-label' but was 'release-label' - comparing <tag ...>original-label</tag> at /project[1]/scm[1]/tag[1]/text()[1] to <tag ...>release-label</tag> at /project[1]/scm[1]/tag[1]/text()[1]
[ERROR] RewritePomsForDevelopmentPhaseTest.testRewriteBasicPomWithGit:271->AbstractReleaseTestCase.comparePomFiles:248->AbstractReleaseTestCase.comparePomFiles:254->AbstractReleaseTestCase.comparePomFiles:271->AbstractReleaseTestCase.comparePomFiles:287->AbstractReleaseTestCase.comparePomFiles:350 Check the transformed POM D:\Entwicklung\Projekte\maven-release\maven-release-manager\target\test-classes\projects\rewrite-for-development\basic-pom-with-git\pom.xml
Expected text value 'HEAD' but was 'release-label' - comparing <tag ...>HEAD</tag> at /project[1]/scm[1]/tag[1]/text()[1] to <tag ...>release-label</tag> at /project[1]/scm[1]/tag[1]/text()[1]
@michael-o I rebased and fixed the test failures in https://github.com/apache/maven-release/pull/86/commits/03b97764cd2445df068f95f59f686a8cdddf19d4 as the failing test was relying on an explicit tag element with the default value "HEAD" (which is superfluous). I now only strip the tag with a default value for providers not supporting tag resolving.
Since this fix isn't really Subversion-specific, because it affects all SCMs, can you add a Git-based test too?
There are already some git based tests, e.g. in https://github.com/apache/maven-release/blob/master/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java#L254-L293. They also verify that my fix isn't introducing regressions for the other providers AFAIK. If you disagree, please let me know which particular aspect you want to have tested in a git-based test?
True, since we have those counterparts in code, would it make sense to have your new tests to match in amount, shape and naming?
@michael-o Done in https://github.com/apache/maven-release/pull/86/commits/f8825d686adf0e1789726c7dddb1e6dbed3bd98a