From a965b55cf48f21e993b8ff34466147f51f7427f6 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 25 Feb 2009 21:10:31 +0000 Subject: [PATCH] o fixing the tests git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@747925 13f79535-47bb-0310-9956-ffa450edef68 --- .../project/artifact/MavenMetadataSourceTest.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/maven-project/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java b/maven-project/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java index 68ea10acc4..8f5dda53c3 100644 --- a/maven-project/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java +++ b/maven-project/src/test/java/org/apache/maven/project/artifact/MavenMetadataSourceTest.java @@ -46,6 +46,7 @@ public class MavenMetadataSourceTest protected void setUp() throws Exception { + super.setUp(); repositorySystem = lookup( MavenRepositorySystem.class ); } @@ -113,9 +114,7 @@ public class MavenMetadataSourceTest MavenProject project = new MavenProject( model ); - ArtifactFactory factory = lookup( ArtifactFactory.class ); - - project.setArtifacts( project.createArtifacts( factory, null, null ) ); + project.setArtifacts( repositorySystem.createArtifacts( project.getDependencies(), null, null, project ) ); String key = ArtifactUtils.versionlessKey( groupId, artifactId ); @@ -166,10 +165,8 @@ public class MavenMetadataSourceTest injector.injectDefaults( model ); - ArtifactFactory factory = lookup( ArtifactFactory.class ); - - project.setArtifacts( project.createArtifacts( factory, null, null ) ); - + project.setArtifacts( repositorySystem.createArtifacts( project.getDependencies(), null, null, project ) ); + String key = ArtifactUtils.versionlessKey( groupId, artifactId ); Map artifactMap = project.getArtifactMap();