kwin commented on code in PR #1421:
URL: https://github.com/apache/maven-release/pull/1421#discussion_r2541338552
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForBranchPhase.java:
##########
@@ -82,24 +81,20 @@ protected void transformScm(
throw new ReleaseExecutionException(e.getMessage(), e);
}
} else {
- MavenProject parent = project.getParent();
- if (parent != null) {
- // If the SCM element is not present, only add it if the
parent was not mapped (ie, it's external to
- // the release process and so has not been modified, so
the values will not be correct on the tag),
- String parentId =
ArtifactUtils.versionlessKey(parent.getGroupId(), parent.getArtifactId());
- if (!releaseDescriptor.hasOriginalScmInfo(parentId)) {
- // we need to add it, since it has changed from the
inherited value
- scmRoot = new Scm();
- // reset default value (HEAD)
- scmRoot.setTag(null);
-
- try {
- if (translateScm(project, releaseDescriptor,
scmRoot, scmRepository, result)) {
- modelTarget.setScm(scmRoot);
- }
- } catch (IOException e) {
- throw new
ReleaseExecutionException(e.getMessage(), e);
+ // If the SCM element is not present, only add it if the
parent was not mapped (ie, it's external to
+ // the release process and so has not been modified, so the
values will not be correct on the tag),
Review Comment:
```suggestion
// the release process and so has not been modified, so the
values otherwise won't be correct on the tag),
```
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhase.java:
##########
@@ -81,24 +80,20 @@ protected void transformScm(
throw new ReleaseExecutionException(e.getMessage(), e);
}
} else {
- MavenProject parent = project.getParent();
- if (parent != null) {
- // If the SCM element is not present, only add it if the
parent was not mapped (ie, it's external to
- // the release process and so has not been modified, so
the values will not be correct on the tag),
- String parentId =
ArtifactUtils.versionlessKey(parent.getGroupId(), parent.getArtifactId());
- if (!releaseDescriptor.hasOriginalScmInfo(parentId)) {
- // we need to add it, since it has changed from the
inherited value
- Scm scmTarget = new Scm();
- // reset default value (HEAD)
- scmTarget.setTag(null);
-
- try {
- if (translateScm(project, releaseDescriptor,
scmTarget, scmRepository, result)) {
- modelTarget.setScm(scmTarget);
- }
- } catch (IOException e) {
- throw new
ReleaseExecutionException(e.getMessage(), e);
+ // If the SCM element is not present, only add it if the
parent was not mapped (ie, it's external to
+ // the release process and so has not been modified, so the
values will not be correct on the tag),
Review Comment:
same as above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]