Class SessionBuilderSupplier

java.lang.Object
org.eclipse.aether.supplier.SessionBuilderSupplier
All Implemented Interfaces:
Supplier<org.eclipse.aether.RepositorySystemSession.SessionBuilder>

public class SessionBuilderSupplier extends Object implements Supplier<org.eclipse.aether.RepositorySystemSession.SessionBuilder>
A simple Supplier of RepositorySystemSession.SessionBuilder instances, that on each call supplies newly constructed instance. To create session out of builder, use RepositorySystemSession.SessionBuilder.build(). For proper closing of sessions, use RepositorySystemSession.CloseableSession.close() method on built instance(s).

Extend this class and override methods to customize, if needed.

Since:
2.0.0
  • Field Details

    • repositorySystem

      protected final org.eclipse.aether.RepositorySystem repositorySystem
  • Constructor Details

    • SessionBuilderSupplier

      public SessionBuilderSupplier(org.eclipse.aether.RepositorySystem repositorySystem)
  • Method Details

    • configureSessionBuilder

      protected void configureSessionBuilder(org.eclipse.aether.RepositorySystemSession.SessionBuilder session)
    • getDependencyTraverser

      protected org.eclipse.aether.collection.DependencyTraverser getDependencyTraverser()
    • getDependencyManager

      protected org.eclipse.aether.collection.DependencyManager getDependencyManager()
    • getDependencySelector

      protected org.eclipse.aether.collection.DependencySelector getDependencySelector()
    • getDependencyGraphTransformer

      protected org.eclipse.aether.collection.DependencyGraphTransformer getDependencyGraphTransformer()
    • getArtifactTypeRegistry

      protected org.eclipse.aether.artifact.ArtifactTypeRegistry getArtifactTypeRegistry()
    • getArtifactDescriptorPolicy

      protected org.eclipse.aether.resolution.ArtifactDescriptorPolicy getArtifactDescriptorPolicy()
    • get

      public org.eclipse.aether.RepositorySystemSession.SessionBuilder get()
      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. At least, local repository manager needs to be configured to make session be able to create session instance.
      Specified by:
      get in interface Supplier<org.eclipse.aether.RepositorySystemSession.SessionBuilder>
      Returns:
      SessionBuilder configured with minimally required things for "Maven-based resolution". At least LRM must be set on builder to make it able to create session instances.