diff --git a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java index 9f836c28e6..ac3954dfc0 100644 --- a/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java +++ b/maven-core/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java @@ -23,7 +23,6 @@ import java.net.URL; import java.util.Arrays; import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; import org.apache.maven.model.building.ModelBuildingException; import org.apache.maven.model.building.ModelProblem; import org.apache.maven.repository.RepositorySystem; @@ -119,11 +118,7 @@ public abstract class AbstractMavenProjectTestCase protected ArtifactRepository getLocalRepository() throws Exception { - ArtifactRepositoryLayout repoLayout = lookup( ArtifactRepositoryLayout.class, "legacy" ); - - ArtifactRepository r = repositorySystem.createArtifactRepository( "local", "file://" + getLocalRepositoryPath().getAbsolutePath(), repoLayout, null, null ); - - return r; + return repositorySystem.createLocalRepository( getLocalRepositoryPath() ); } // ---------------------------------------------------------------------- diff --git a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java index 008c6d3bdc..b2e314f524 100644 --- a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java +++ b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java @@ -198,11 +198,7 @@ public class DefaultMavenProjectBuilderTest protected ArtifactRepository getLocalRepository() throws Exception { - ArtifactRepositoryLayout repoLayout = lookup( ArtifactRepositoryLayout.class, "default" ); - ArtifactRepository r = - repositorySystem.createArtifactRepository( "local", "file://" + localRepoDir.getAbsolutePath(), repoLayout, - null, null ); - return r; + return repositorySystem.createLocalRepository( getLocalRepositoryPath() ); } public void xtestLoop()