Class LookupInvoker<O extends Options,R extends InvokerRequest<O>,C extends LookupInvoker.LookupInvokerContext<O,R,C>>

java.lang.Object
org.apache.maven.cling.invoker.LookupInvoker<O,R,C>
Type Parameters:
O - the options type
R - the request type
C - the context type
All Implemented Interfaces:
AutoCloseable, Invoker<R>
Direct Known Subclasses:
DefaultEncryptInvoker, DefaultMavenInvoker

public abstract class LookupInvoker<O extends Options,R extends InvokerRequest<O>,C extends LookupInvoker.LookupInvokerContext<O,R,C>> extends Object implements Invoker<R>
Plexus invoker implementation, that boots up Plexus DI container. This class expects fully setup ClassWorld via constructor.
  • Field Details

    • protoLookup

      protected final ProtoLookup protoLookup
  • Constructor Details

    • LookupInvoker

      public LookupInvoker(ProtoLookup protoLookup)
  • Method Details

    • invoke

      public int invoke(R invokerRequest) throws InvokerException
      Specified by:
      invoke in interface Invoker<O extends Options>
      Throws:
      InvokerException
    • doInvoke

      protected int doInvoke(C context) throws Exception
      Throws:
      Exception
    • handleException

      protected InvokerException handleException(LookupInvoker.LookupInvokerContext<O,R,C> context, Exception e) throws InvokerException
      Throws:
      InvokerException
    • createContext

      protected abstract C createContext(R invokerRequest) throws InvokerException
      Throws:
      InvokerException
    • pushProperties

      protected void pushProperties(C context) throws Exception
      Throws:
      Exception
    • validate

      protected void validate(C context) throws Exception
      Throws:
      Exception
    • prepare

      protected void prepare(C context) throws Exception
      Throws:
      Exception
    • configureLogging

      protected void configureLogging(C context) throws Exception
      Throws:
      Exception
    • createTerminal

      protected org.jline.terminal.Terminal createTerminal(C context)
    • doConfigureWithTerminal

      protected void doConfigureWithTerminal(C context, org.jline.terminal.Terminal terminal)
    • determineBuildEventListener

      protected org.apache.maven.logging.BuildEventListener determineBuildEventListener(C context)
    • doDetermineBuildEventListener

      protected org.apache.maven.logging.BuildEventListener doDetermineBuildEventListener(C context)
    • activateLogging

      protected void activateLogging(C context) throws Exception
      Throws:
      Exception
    • helpOrVersionAndMayExit

      protected void helpOrVersionAndMayExit(C context) throws Exception
      Throws:
      Exception
    • preCommands

      protected void preCommands(C context) throws Exception
      Throws:
      Exception
    • container

      protected void container(C context) throws Exception
      Throws:
      Exception
    • createContainerCapsuleFactory

      protected ContainerCapsuleFactory<O,R,C> createContainerCapsuleFactory()
    • lookup

      protected void lookup(C context) throws Exception
      Throws:
      Exception
    • init

      protected void init(C context) throws Exception
      Throws:
      Exception
    • postCommands

      protected void postCommands(C context) throws Exception
      Throws:
      Exception
    • settings

      protected void settings(C context) throws Exception
      Throws:
      Exception
    • settings

      protected void settings(C context, org.apache.maven.api.services.SettingsBuilder settingsBuilder) throws Exception
      Throws:
      Exception
    • customizeSettingsRequest

      protected void customizeSettingsRequest(C context, org.apache.maven.api.services.SettingsBuilderRequest settingsBuilderRequest) throws Exception
      Throws:
      Exception
    • customizeSettingsResult

      protected void customizeSettingsResult(C context, org.apache.maven.api.services.SettingsBuilderResult settingsBuilderResult) throws Exception
      Throws:
      Exception
    • mayDisableInteractiveMode

      protected boolean mayDisableInteractiveMode(C context, boolean proposedInteractive)
    • localRepositoryPath

      protected Path localRepositoryPath(C context)
    • populateRequest

      protected void populateRequest(C context, org.apache.maven.execution.MavenExecutionRequest request) throws Exception
      Throws:
      Exception
    • populateRequestFromSettings

      protected void populateRequestFromSettings(org.apache.maven.execution.MavenExecutionRequest request, org.apache.maven.api.settings.Settings settings) throws Exception
      Throws:
      Exception
    • calculateDegreeOfConcurrency

      protected int calculateDegreeOfConcurrency(String threadConfiguration)
    • isRunningOnCI

      protected boolean isRunningOnCI(C context)
    • determineTransferListener

      protected org.eclipse.aether.transfer.TransferListener determineTransferListener(C context, boolean noTransferProgress)
    • execute

      protected abstract int execute(C context) throws Exception
      Throws:
      Exception