diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 91f5c33a40..f7ababd29c 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -320,6 +320,7 @@ public class DefaultMavenProjectBuilder } project.setArtifacts( result.getArtifacts() ); + project.getArtifacts().remove( pomArtifact ); return new MavenProjectBuildingResult( project, result ); } diff --git a/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java b/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java index 43e9494aca..535b95072d 100644 --- a/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java @@ -69,7 +69,7 @@ public class ProjectInheritanceTest Set set = project1.getArtifacts(); assertNotNull("No artifacts", set); assertTrue("No Artifacts", set.size() > 0); - assertTrue("Set size should be 4, is " + set.size(), set.size() == 4); + assertTrue("Set size should be 3, is " + set.size(), set.size() == 3); Iterator iter = set.iterator(); while (iter.hasNext()) { diff --git a/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java b/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java index ef8d98bf8d..7e168c444f 100644 --- a/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java @@ -66,7 +66,7 @@ public class ProjectInheritanceTest assertNotNull("No artifacts", set); assertTrue("No Artifacts", set.size() > 0); Iterator iter = set.iterator(); - assertTrue("Set size should be 5, is " + set.size(), set.size() == 5); + assertTrue("Set size should be 4, is " + set.size(), set.size() == 4); while (iter.hasNext()) { diff --git a/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java b/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java index 08a3dea064..9c73b9a585 100644 --- a/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/inheritance/t08/ProjectInheritanceTest.java @@ -67,7 +67,7 @@ public class ProjectInheritanceTest assertNotNull("No artifacts", set); assertTrue("No Artifacts", set.size() > 0); Iterator iter = set.iterator(); - assertTrue("Set size should be 5, is " + set.size(), set.size() == 5); + assertTrue("Set size should be 4, is " + set.size(), set.size() == 4); while (iter.hasNext()) { diff --git a/maven-core/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java b/maven-core/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java index 51eacd9c67..3457e827e4 100644 --- a/maven-core/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/inheritance/t10/ProjectInheritanceTest.java @@ -71,7 +71,7 @@ public class ProjectInheritanceTest Map map = project1.getArtifactMap(); assertNotNull("No artifacts", map); assertTrue("No Artifacts", map.size() > 0); - assertTrue("Set size should be 4, is " + map.size(), map.size() == 4); + assertTrue("Set size should be 3, is " + map.size(), map.size() == 3); Artifact a = (Artifact) map.get("maven-test:t10-a"); Artifact b = (Artifact) map.get("maven-test:t10-b");