diff --git a/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java b/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
index 2e43d2bb47..d339daa610 100644
--- a/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
+++ b/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
@@ -106,6 +106,14 @@ public class PomConstructionTest
assertEquals( 1, ( (List>) pom.getValue( "reporting/plugins[1]/reportSets" ) ).size() );
}
//*/
+ /** MNG-3985 */
+ public void testMultipleRepositories()
+ throws Exception
+ {
+ PomTestWrapper pom = buildPom( "multiple-repos/sub" );
+ assertEquals( 3, ( (List>) pom.getValue( "repositories" ) ).size() );
+ }
+
public void testOrderOfGoalsFromPluginExecutionWithoutPluginManagement()
throws Exception
diff --git a/maven-project/src/test/resources-project-builder/multiple-repos/pom.xml b/maven-project/src/test/resources-project-builder/multiple-repos/pom.xml
new file mode 100644
index 0000000000..6c14fcd035
--- /dev/null
+++ b/maven-project/src/test/resources-project-builder/multiple-repos/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+ 4.0.0
+
+ mng3984
+ test-1
+ 0.1
+
+ MNG-3984
+
+
+ central-parent
+ Maven Repository Switchboard
+ default
+ http://repo1.maven.org/maven2
+
+ false
+
+
+
+
+
+
diff --git a/maven-project/src/test/resources-project-builder/multiple-repos/sub/pom.xml b/maven-project/src/test/resources-project-builder/multiple-repos/sub/pom.xml
new file mode 100644
index 0000000000..d7b210201a
--- /dev/null
+++ b/maven-project/src/test/resources-project-builder/multiple-repos/sub/pom.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ 4.0.0
+
+ mng3984
+ test-1
+ 0.1
+
+ mng3984
+ test-2
+ 0.1
+
+ MNG-3984
+
+
+ central-child
+ Maven Repository Switchboard
+ default
+ http://repo1.maven.org/maven2
+
+ false
+
+
+
+