Class MavenRepositorySystemUtils

java.lang.Object
org.apache.maven.repository.internal.MavenRepositorySystemUtils

public final class MavenRepositorySystemUtils extends Object
A utility class to assist in setting up a Maven-like repository system. Note: This component is meant to assist those clients that employ the repository system outside of an IoC container, Maven plugins should instead always use regular dependency injection to acquire the repository system.
Author:
Benjamin Bentmann
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.aether.impl.DefaultServiceLocator
    Deprecated.
    This method is deprecated along with DefaultServiceLocator (since Maven Resolver 1.7.0).
    static org.eclipse.aether.DefaultRepositorySystemSession
    Creates a new Maven-like repository system session by initializing the session with values typical for Maven-based resolution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newServiceLocator

      @Deprecated public static org.eclipse.aether.impl.DefaultServiceLocator newServiceLocator()
      Deprecated.
      This method is deprecated along with DefaultServiceLocator (since Maven Resolver 1.7.0).
      Creates a new service locator that already knows about all service implementations included in this library. To acquire a complete repository system, clients need to add some repository connectors for remote transfers.
      Returns:
      The new service locator, never null.
    • newSession

      public static org.eclipse.aether.DefaultRepositorySystemSession newSession()
      Creates a new Maven-like repository system session by initializing the session with values typical for Maven-based resolution. In more detail, this method configures settings relevant for the processing of dependency graphs, most other settings remain at their generic default value. Use the various setters to further configure the session with authentication, mirror, proxy and other information required for your environment.
      Returns:
      The new repository system session, never null.