You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "wuwen5 (via GitHub)" <gi...@apache.org> on 2023/07/19 11:38:59 UTC

[GitHub] [maven-release] wuwen5 opened a new pull request, #196: [MRELEASE-1054] Support for excluding submodules changes.

wuwen5 opened a new pull request, #196:
URL: https://github.com/apache/maven-release/pull/196

   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MRELEASE) 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 `[MRELEASE-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MRELEASE-XXX` with 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-its` to 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](https://www.apache.org/licenses/icla.pdf) 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](http://www.apache.org/licenses/LICENSE-2.0)
   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](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [x] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   
   As described in [MRELEASE-1054], when I use the Git submodule in a project, `release: prepare` will fail. I really need to support the release of the Git submodule, and I also have a pull request in the maven-scm project https://github.com/apache/maven-scm/pull/179.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1877095588


##########
maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java:
##########
@@ -2452,6 +2453,9 @@ private static MavenProject createProject(String artifactId, String version) {
         model.setGroupId("groupId");
         model.setArtifactId(artifactId);
         model.setVersion(version);
-        return new MavenProject(model);
+
+        MavenProject mavenProject = new MavenProject(model);

Review Comment:
   In the previous test cases, the `file` field in the mock object of `MavenProject` was null, which led to an exception. To address this, null detection has been implemented, and new test cases have been added.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on PR #196:
URL: https://github.com/apache/maven-release/pull/196#issuecomment-1864331769

   @elharo  I have addressed the issues you pointed out, and I kindly request you to review the modified code. If you have any further suggestions or if there are additional changes needed, please let me know.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1432603322


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -39,6 +43,7 @@
 import org.apache.maven.shared.release.versions.VersionParseException;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.codehaus.plexus.util.SelectorUtils;

Review Comment:
   I think this should be handled as a separate issue, as it is currently being used in multiple places



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1438995411


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -39,6 +43,7 @@
 import org.apache.maven.shared.release.versions.VersionParseException;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.codehaus.plexus.util.SelectorUtils;

Review Comment:
   Removed use of `SelectorUtils`



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1882003514


##########
maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java:
##########
@@ -2447,11 +2448,44 @@ public void testUpdateDevelopmentInvalidDefaultDevelopmentVersion_NonInteractive
         }
     }
 
+    @Test
+    public void testSimulateRelease_CheckModificationExcludes() throws Exception {
+        // verify
+        MapReleaseVersionsPhase phase =
+                new MapReleaseVersionsPhase(scmRepositoryConfigurator, mockPrompter, versionPolicies);
+
+        List<MavenProject> reactorProjects = Collections.singletonList(createProjectWithPomFile("artifactId", "1.2"));
+
+        ReleaseDescriptorBuilder builder = new ReleaseDescriptorBuilder();
+        builder.setCheckModificationExcludes(Collections.singletonList("**/pom1.xml"));
+
+        // test
+        phase.simulate(ReleaseUtils.buildReleaseDescriptor(builder), new DefaultReleaseEnvironment(), reactorProjects);
+
+        // verify
+        assertNull(

Review Comment:
   When would this not be null? Is there a test for that case?



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1883525657


##########
maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java:
##########
@@ -2452,6 +2453,9 @@ private static MavenProject createProject(String artifactId, String version) {
         model.setGroupId("groupId");
         model.setArtifactId(artifactId);
         model.setVersion(version);
-        return new MavenProject(model);
+
+        MavenProject mavenProject = new MavenProject(model);

Review Comment:
   I have added new test cases and I believe they have all been hit



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1882002284


##########
maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java:
##########
@@ -2452,6 +2453,9 @@ private static MavenProject createProject(String artifactId, String version) {
         model.setGroupId("groupId");
         model.setArtifactId(artifactId);
         model.setVersion(version);
-        return new MavenProject(model);
+
+        MavenProject mavenProject = new MavenProject(model);

Review Comment:
   Thanks. That helps. However, test coverage still feels very limited. There's a lot of new code here and I'm not sure it's all being hit. 



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1876862759


##########
maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/MapVersionsPhaseTest.java:
##########
@@ -2452,6 +2453,9 @@ private static MavenProject createProject(String artifactId, String version) {
         model.setGroupId("groupId");
         model.setArtifactId(artifactId);
         model.setVersion(version);
-        return new MavenProject(model);
+
+        MavenProject mavenProject = new MavenProject(model);

Review Comment:
   does this actually test the bug? It looks like a little new setup code but I don't see how the behavior has changed.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-release] elharo commented on a diff in pull request #196: [MRELEASE-1054] Support for excluding submodules changes.

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1292889605


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -39,6 +43,7 @@
 import org.apache.maven.shared.release.versions.VersionParseException;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.codehaus.plexus.util.SelectorUtils;

Review Comment:
   I'd like to avoid addition al plexus dependencies if at all possible.



##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java:
##########
@@ -142,6 +147,15 @@ public ReleaseResult execute(
             throws ReleaseExecutionException, ReleaseFailureException {
         ReleaseResult result = new ReleaseResult();
 
+        List<String> additionalExcludes = releaseDescriptor.getCheckModificationExcludes();
+
+        if (additionalExcludes != null) {
+            for (String additionalExclude : additionalExcludes) {
+                exclusionPatterns.add(
+                        additionalExclude.replace("\\", File.separator).replace("/", File.separator));

Review Comment:
   same as above



##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -118,6 +125,15 @@ public ReleaseResult execute(
             throws ReleaseExecutionException {
         ReleaseResult result = new ReleaseResult();
 
+        List<String> additionalExcludes = releaseDescriptor.getCheckModificationExcludes();
+
+        if (additionalExcludes != null) {
+            for (String additionalExclude : additionalExcludes) {
+                exclusionPatterns.add(
+                        additionalExclude.replace("\\", File.separator).replace("/", File.separator));

Review Comment:
   File.separator is platform dependent, but I'm not sure it should be here. That is, exclusions should be specified in a platform independent, standard way. I could be wrong about that but if I am, please elaborate in detail on how this works with references to docs. 



##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java:
##########
@@ -199,13 +213,18 @@ private void transform(
 
         for (MavenProject project : reactorProjects) {
             URI pom = project.getFile().toURI();
-            logInfo(
-                    result,
-                    "Transforming " + root.relativize(pom).getPath() + ' '
-                            + buffer().project(project.getArtifactId()) + " '" + project.getName() + "'"
-                            + (simulate ? " with ." + getPomSuffix() + " suffix" : "") + "...");
+            final String path = root.relativize(pom).getPath();
+
+            if (exclusionPatterns.stream()
+                    .noneMatch(exclusionPattern -> SelectorUtils.matchPath(exclusionPattern, path))) {
+                logInfo(

Review Comment:
   why log this? debug level at most



##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -165,17 +181,24 @@ public ReleaseResult execute(
                 }
             }
         } else {
+            URI root = rootProject.getBasedir().toURI();
             for (MavenProject project : reactorProjects) {
                 String projectId = ArtifactUtils.versionlessKey(project.getGroupId(), project.getArtifactId());
 
                 String nextVersion = resolveNextVersion(project, projectId, releaseDescriptor, releaseEnvironment);
 
-                if (!convertToSnapshot) {
-                    releaseDescriptor.addReleaseVersion(projectId, nextVersion);
-                } else if (releaseDescriptor.isBranchCreation() && convertToBranch) {
-                    releaseDescriptor.addReleaseVersion(projectId, nextVersion);
-                } else {
-                    releaseDescriptor.addDevelopmentVersion(projectId, nextVersion);
+                URI pom = project.getFile().toURI();
+                final String path = root.relativize(pom).getPath();
+
+                if (exclusionPatterns.stream()
+                        .noneMatch(exclusionPattern -> SelectorUtils.matchPath(exclusionPattern, path))) {

Review Comment:
   a basic loop with no lambdas would be easier to read



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-release] wuwen5 commented on a diff in pull request #196: [MRELEASE-1054] Support for excluding submodules changes.

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1296750876


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java:
##########
@@ -199,13 +213,18 @@ private void transform(
 
         for (MavenProject project : reactorProjects) {
             URI pom = project.getFile().toURI();
-            logInfo(
-                    result,
-                    "Transforming " + root.relativize(pom).getPath() + ' '
-                            + buffer().project(project.getArtifactId()) + " '" + project.getName() + "'"
-                            + (simulate ? " with ." + getPomSuffix() + " suffix" : "") + "...");
+            final String path = root.relativize(pom).getPath();
+
+            if (exclusionPatterns.stream()
+                    .noneMatch(exclusionPattern -> SelectorUtils.matchPath(exclusionPattern, path))) {
+                logInfo(

Review Comment:
   This log is not a newly added code, it only adds exclusion conditions here, Please refer to lines `202-206`.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1432603322


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -39,6 +43,7 @@
 import org.apache.maven.shared.release.versions.VersionParseException;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.codehaus.plexus.util.SelectorUtils;

Review Comment:
   I think this should be handled as an independent issue, as it is currently being used in multiple places



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo merged PR #196:
URL: https://github.com/apache/maven-release/pull/196


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1883913424


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractScmCommitPhase.java:
##########
@@ -288,11 +303,25 @@ protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor,
      * @param reactorProjects   a {@link java.util.List} object
      * @return a {@link java.util.List} object
      */
-    protected static List<File> createPomFiles(
-            ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects) {
+    protected List<File> createPomFiles(ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects) {
+
         List<File> pomFiles = new ArrayList<>();
         for (MavenProject project : reactorProjects) {
-            pomFiles.addAll(createPomFiles(releaseDescriptor, project));
+
+            final String path = project.getFile().getPath();

Review Comment:
   I'll use `anyMatch`



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1432644313


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java:
##########
@@ -199,13 +213,18 @@ private void transform(
 
         for (MavenProject project : reactorProjects) {
             URI pom = project.getFile().toURI();
-            logInfo(
-                    result,
-                    "Transforming " + root.relativize(pom).getPath() + ' '
-                            + buffer().project(project.getArtifactId()) + " '" + project.getName() + "'"
-                            + (simulate ? " with ." + getPomSuffix() + " suffix" : "") + "...");
+            final String path = root.relativize(pom).getPath();
+
+            if (exclusionPatterns.stream()
+                    .noneMatch(exclusionPattern -> SelectorUtils.matchPath(exclusionPattern, path))) {
+                logInfo(

Review Comment:
   I wouldn't log any of this at info level, and I certainly add more logging to the existing logging at info level. 



##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -39,6 +43,7 @@
 import org.apache.maven.shared.release.versions.VersionParseException;
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
+import org.codehaus.plexus.util.SelectorUtils;

Review Comment:
   Removing existing usages is a separate issue. Not adding new usages is still important for each PR.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-release] elharo commented on a diff in pull request #196: [MRELEASE-1054] Support for excluding submodules changes.

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1297127776


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -118,6 +125,15 @@ public ReleaseResult execute(
             throws ReleaseExecutionException {
         ReleaseResult result = new ReleaseResult();
 
+        List<String> additionalExcludes = releaseDescriptor.getCheckModificationExcludes();
+
+        if (additionalExcludes != null) {
+            for (String additionalExclude : additionalExcludes) {
+                exclusionPatterns.add(
+                        additionalExclude.replace("\\", File.separator).replace("/", File.separator));

Review Comment:
   I'm having trouble finding that reference. Regardless, we shouldn't be using plexus for this any more,. Possibly maven-shared-utils but ideally not even that. 



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-release] wuwen5 commented on a diff in pull request #196: [MRELEASE-1054] Support for excluding submodules changes.

Posted by "wuwen5 (via GitHub)" <gi...@apache.org>.
wuwen5 commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1296739293


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractMapVersionsPhase.java:
##########
@@ -118,6 +125,15 @@ public ReleaseResult execute(
             throws ReleaseExecutionException {
         ReleaseResult result = new ReleaseResult();
 
+        List<String> additionalExcludes = releaseDescriptor.getCheckModificationExcludes();
+
+        if (additionalExcludes != null) {
+            for (String additionalExclude : additionalExcludes) {
+                exclusionPatterns.add(
+                        additionalExclude.replace("\\", File.separator).replace("/", File.separator));

Review Comment:
   I fully referenced the implementation in `ScmCheckModificationsPhase`.
   There is a comment explaining `// SelectorUtils expects File.separator, don't standardize`



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MRELEASE-1054] Support for excluding submodules changes. [maven-release]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on code in PR #196:
URL: https://github.com/apache/maven-release/pull/196#discussion_r1883813971


##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractScmCommitPhase.java:
##########
@@ -288,11 +303,25 @@ protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor,
      * @param reactorProjects   a {@link java.util.List} object
      * @return a {@link java.util.List} object
      */
-    protected static List<File> createPomFiles(
-            ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects) {
+    protected List<File> createPomFiles(ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects) {
+
         List<File> pomFiles = new ArrayList<>();
         for (MavenProject project : reactorProjects) {
-            pomFiles.addAll(createPomFiles(releaseDescriptor, project));
+
+            final String path = project.getFile().getPath();

Review Comment:
   Might want to use a lambda and anyMatch here. Up to you.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org