You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2026/10/14 12:33:08 UTC

(maven) branch backport-13449-to-4.0.x created (now 18a0c264ce)

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

gnodet pushed a change to branch backport-13449-to-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 18a0c264ce Fix #13448: isolate model builder test roots

This branch includes the following new commits:

     new 18a0c264ce Fix #13448: isolate model builder test roots

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.



(maven) 01/01: Fix #13448: isolate model builder test roots

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

gnodet pushed a commit to branch backport-13449-to-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 18a0c264cebb7c6bd2f08234c4d830219a885c6e
Author: Efe <go...@gmail.com>
AuthorDate: Wed Oct 14 15:32:33 2026 +0300

    Fix #13448: isolate model builder test roots
---
 .../java/org/apache/maven/impl/model/ComplexActivationTest.java   | 8 ++++++++
 impl/maven-impl/src/test/resources/poms/factory/.mvn/maven.config | 1 +
 2 files changed, 9 insertions(+)

diff --git a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/ComplexActivationTest.java b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/ComplexActivationTest.java
index eed8b9fa5a..79c6fd76dc 100644
--- a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/ComplexActivationTest.java
+++ b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/ComplexActivationTest.java
@@ -28,6 +28,7 @@
 import org.apache.maven.api.services.ModelBuilderRequest;
 import org.apache.maven.api.services.ModelBuilderResult;
 import org.apache.maven.api.services.Sources;
+import org.apache.maven.api.services.model.RootLocator;
 import org.apache.maven.impl.standalone.ApiRunner;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -52,6 +53,13 @@ void setup() {
         assertNotNull(builder);
     }
 
+    @Test
+    void testFactoryPomsUseTheirOwnRootDirectory() {
+        Path pom = getPom("complex");
+
+        assertEquals(pom.getParent(), session.getService(RootLocator.class).findMandatoryRoot(pom));
+    }
+
     @Test
     void testAndConditionInActivation() throws Exception {
         ModelBuilderRequest request = ModelBuilderRequest.builder()
diff --git a/impl/maven-impl/src/test/resources/poms/factory/.mvn/maven.config b/impl/maven-impl/src/test/resources/poms/factory/.mvn/maven.config
new file mode 100644
index 0000000000..102f73aadc
--- /dev/null
+++ b/impl/maven-impl/src/test/resources/poms/factory/.mvn/maven.config
@@ -0,0 +1 @@
+# Standalone model-builder fixtures are rooted in this directory.