You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mt...@apache.org on 2021/03/22 09:46:52 UTC

[maven] branch MNG-7102-exclude-projects-recursively updated (7c4d2aa -> 47aec38)

This is an automated email from the ASF dual-hosted git repository.

mthmulders pushed a change to branch MNG-7102-exclude-projects-recursively
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 7c4d2aa  [MNG-7102] The child modules of excluded projects are now excluded as well, making the behavior consistent with MNG-6981.
     add 441cf73  improve documentation
     add 9b5b8d4  extract AbstractMavenLifecycleParticipant dispatch methods
     add a515fbe  [MNG-7035] remove duplicate dependency (causing warning on build)
     add 8ceb6c6  [MNG-7063] Infinite loop using Shade plugin and JUnit 5 dependency
     add d740200  [MNG-7107] relax profile id validation, different from coordinate id
     add b23116d  [MNG-6114] Elements from the global settings should be ordered before elements from the user settings
     add a242c1a  [MNG-6471] Parallel builder should use the module name as thread name
     add c3dba0e  [MNG-6113] Rename the 'Central Repository' to 'Maven Central Repository' in the 4.0.0 super POM
     add 0e75baa  improve and fix javadoc
     add 9643ac6  [MNG-7051] When an optional profile could not be found, an info message should be thrown instead of a warning.
     add ad24f59  [MNG-7051] Return unmodifiable profile lists
     add aa90370  [MNG-7110] Different behavior of extensions restore configuration of importRequest
     add 9e19b57  [MNG-7111] Deadlock when reading pom
     add a5c68f7  Revert "[MNG-7046] Revert MNG-5639 and make repo config static only"
     add d5f77a3  [MNG-6399] - Lift JDK minimum to JDK 8
     add d87a1f5  [MNG-7119] Upgrade Maven Wagon to 3.4.3
     add 612dfdd  [MNG-3220] fix doc: dependencyManagement import require scope import
     add acd61cc  use Maven Resolver 1.6.2
     add 3b21386  [MNG-7116] add support for mirrorOf external:http:*
     add 28b4ea9  [MNG-7117] add support for blocked mirror
     add 6712567  [MNG-7118] block HTTP repositories by default
     add 1e19805  [MNG-6075] Increase the model validation level to the next minor level version
     add 3e65637  [MNG-6808] Provide Maven BOM
     new 47aec38  [MNG-7102] The child modules of excluded projects are now excluded as well, making the behavior consistent with MNG-6981.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (7c4d2aa)
            \
             N -- N -- N   refs/heads/MNG-7102-exclude-projects-recursively (47aec38)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                          |   4 +-
 apache-maven/README.txt                            |  12 +--
 apache-maven/src/assembly/maven/conf/settings.xml  |  11 +-
 maven-bom/pom.xml                                  | 112 ++++++++++++++++++++
 .../maven/repository/DefaultMirrorSelector.java    |  53 ++++++++--
 .../main/java/org/apache/maven/DefaultMaven.java   |  51 +++++----
 .../apache/maven/bridge/MavenRepositorySystem.java |  50 ++++++++-
 .../maven/execution/MavenExecutionRequest.java     |  16 +--
 .../apache/maven/execution/ProfileActivation.java  |   5 +-
 .../apache/maven/graph/DefaultGraphBuilder.java    |  11 +-
 .../DefaultRepositorySystemSessionFactory.java     |   4 +-
 .../multithreaded/MultiThreadedBuilder.java        |  21 +++-
 .../maven/project/DefaultProjectBuilder.java       |   6 +-
 .../apache/maven/project/ProjectModelResolver.java |   5 +-
 maven-core/src/site/apt/index.apt                  |   2 +-
 .../maven/graph/DefaultGraphBuilderTest.java       |  10 +-
 .../project/AbstractMavenProjectTestCase.java      |   2 +
 .../project/DefaultMavenProjectBuilderTest.java    |  65 +++++++-----
 ...pom-resolves-from-property-based-repository.xml |  31 ++++++
 maven-embedder/src/site/apt/index.apt.vm           |   4 +
 .../maven/model/building/DefaultModelBuilder.java  |  32 ++++--
 .../model/building/DefaultTransformerContext.java  |  68 ++++++++++--
 .../maven/model/building/ModelBuildingRequest.java |   2 +-
 .../model/validation/DefaultModelValidator.java    | 116 ++++++++++++++-------
 .../resources/org/apache/maven/model/pom-4.0.0.xml |   4 +-
 maven-model-builder/src/site/apt/index.apt         |   2 +-
 .../validation/DefaultModelValidatorTest.java      |  88 +++++++---------
 ...-ids-pom.xml => invalid-coordinate-ids-pom.xml} |   0
 ...alid-profile-id.xml => invalid-profile-ids.xml} |  15 +++
 .../repository/internal/DefaultModelResolver.java  |   4 +
 .../maven/settings/merge/MavenSettingsMerger.java  |   5 +-
 maven-settings/pom.xml                             |   2 +-
 maven-settings/src/main/mdo/settings.mdo           |  13 +++
 maven-test-support/pom.xml                         |   7 --
 pom.xml                                            |  71 ++-----------
 35 files changed, 622 insertions(+), 282 deletions(-)
 create mode 100644 maven-bom/pom.xml
 create mode 100644 maven-core/src/test/resources/projects/import-scope-pom-resolves-from-property-based-repository.xml
 rename maven-model-builder/src/test/resources/poms/validation/{invalid-ids-pom.xml => invalid-coordinate-ids-pom.xml} (100%)
 rename maven-model-builder/src/test/resources/poms/validation/{invalid-profile-id.xml => invalid-profile-ids.xml} (75%)

[maven] 01/01: [MNG-7102] The child modules of excluded projects are now excluded as well, making the behavior consistent with MNG-6981.

Posted by mt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mthmulders pushed a commit to branch MNG-7102-exclude-projects-recursively
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 47aec387df34255aca38e8853a3a06d175a72e11
Author: Martin Kanters <ma...@apache.org>
AuthorDate: Sat Feb 20 11:37:17 2021 +0100

    [MNG-7102] The child modules of excluded projects are now excluded as well, making the behavior consistent with MNG-6981.
---
 .../java/org/apache/maven/graph/DefaultGraphBuilder.java     | 12 +++++++++++-
 .../java/org/apache/maven/graph/DefaultGraphBuilderTest.java |  3 +++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
index 797cbe2..49d52af 100644
--- a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
@@ -255,7 +255,17 @@ public class DefaultGraphBuilder
                         .findFirst()
                         .orElseThrow( () -> new MavenExecutionException( "Could not find the selected project in "
                                 + "the reactor: " + selector, request.getPom() ) );
-                result.remove( excludedProject );
+
+                boolean isExcludedProjectRemoved = result.remove( excludedProject );
+
+                if ( isExcludedProjectRemoved )
+                {
+                    List<MavenProject> children = excludedProject.getCollectedProjects();
+                    if ( children != null )
+                    {
+                        result.removeAll( children );
+                    }
+                }
             }
         }
 
diff --git a/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java b/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java
index 4a8f9c0..e82c735 100644
--- a/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java
@@ -147,6 +147,9 @@ public class DefaultGraphBuilderTest
                         .excludedProjects( MODULE_B )
                         .makeBehavior( REACTOR_MAKE_UPSTREAM )
                         .expectResult( PARENT_MODULE, MODULE_C, MODULE_A, MODULE_C_2 ),
+                scenario( "Excluding a project also excludes its children" )
+                        .excludedProjects( MODULE_C )
+                        .expectResult( PARENT_MODULE, MODULE_A, MODULE_B, INDEPENDENT_MODULE ),
                 scenario( "Excluding an also make dependency from resumeFrom does take its transitive dependency" )
                         .resumeFrom( MODULE_C_2 )
                         .excludedProjects( MODULE_B )