mirror of https://github.com/apache/maven.git
use MavenServiceLocator instead of deprecated DefaultServiceLocator
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1148034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2e1d7433ff
commit
2f56712b42
|
@ -21,6 +21,7 @@ package org.apache.maven.repository.internal;
|
||||||
|
|
||||||
import org.sonatype.aether.RepositorySystem;
|
import org.sonatype.aether.RepositorySystem;
|
||||||
import org.sonatype.aether.impl.MetadataGeneratorFactory;
|
import org.sonatype.aether.impl.MetadataGeneratorFactory;
|
||||||
|
import org.sonatype.aether.spi.locator.ServiceLocator;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
|
@ -30,14 +31,14 @@ public class DefaultServiceLocatorTest
|
||||||
|
|
||||||
public void testGetRepositorySystem()
|
public void testGetRepositorySystem()
|
||||||
{
|
{
|
||||||
DefaultServiceLocator locator = new DefaultServiceLocator();
|
ServiceLocator locator = new MavenServiceLocator();
|
||||||
RepositorySystem repoSys = locator.getService( RepositorySystem.class );
|
RepositorySystem repoSys = locator.getService( RepositorySystem.class );
|
||||||
assertNotNull( repoSys );
|
assertNotNull( repoSys );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetMetadataGeneratorFactories()
|
public void testGetMetadataGeneratorFactories()
|
||||||
{
|
{
|
||||||
DefaultServiceLocator locator = new DefaultServiceLocator();
|
ServiceLocator locator = new MavenServiceLocator();
|
||||||
assertEquals( 2, locator.getServices( MetadataGeneratorFactory.class ).size() );
|
assertEquals( 2, locator.getServices( MetadataGeneratorFactory.class ).size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue