1 package org.apache.maven.repository.internal;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import org.sonatype.aether.impl.ArtifactDescriptorReader;
23 import org.sonatype.aether.impl.MetadataGeneratorFactory;
24 import org.sonatype.aether.impl.VersionRangeResolver;
25 import org.sonatype.aether.impl.VersionResolver;
26
27 /**
28 * A simple service locator that is already setup with all components from this library. To acquire a complete
29 * repository system, clients need to add some repository connectors for remote transfers. <em>Note:</em> This component
30 * is meant to assists those clients that employ the repository systems outside of an IoC container, Maven plugins
31 * should instead always use regular dependency injection to acquire the repository system.
32 *
33 * @author Benjamin Bentmann
34 * @deprecated use {@link MavenServiceLocator} instead, which is more explicit.
35 */
36 public class DefaultServiceLocator
37 extends org.sonatype.aether.impl.internal.DefaultServiceLocator
38 {
39
40 /**
41 * Creates a new service locator that already knows about all service implementations included this library.
42 */
43 public DefaultServiceLocator()
44 {
45 addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
46 addService( VersionResolver.class, DefaultVersionResolver.class );
47 addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
48 addService( MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class );
49 addService( MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class );
50 }
51
52 }