Package org.apache.maven.cling.invoker
Class LookupInvoker<C extends LookupContext>
java.lang.Object
org.apache.maven.cling.invoker.LookupInvoker<C>
- Type Parameters:
C- The context type.
- All Implemented Interfaces:
AutoCloseable,Invoker
- Direct Known Subclasses:
EncryptInvoker,MavenInvoker
Lookup invoker implementation, that boots up DI container.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactivateLogging(C context) protected intcalculateDegreeOfConcurrency(String threadConfiguration) protected voidconfigureLogging(C context) protected voidprotected ContainerCapsuleFactory<C> protected abstract CcreateContext(InvokerRequest invokerRequest) protected voidcreateTerminal(C context) protected voidcustomizeSettingsRequest(C context, SettingsBuilderRequest settingsBuilderRequest) protected voidcustomizeSettingsResult(C context, SettingsBuilderResult settingsBuilderResult) protected Stringdescribe(org.jline.terminal.Terminal terminal) determineWriter(C context) protected voiddoConfigureWithTerminal(C context, org.jline.terminal.Terminal terminal) doDetermineWriter(C context) protected intprotected abstract intprotected InvokerExceptionhandleException(C context, Exception e) protected voidhelpOrVersionAndMayExit(C context) protected voidintinvoke(InvokerRequest invokerRequest) Invokes the Maven application using the providedInvokerRequest.protected booleanisRunningOnCI(C context) protected PathlocalRepositoryPath(C context) protected voidprotected booleanmayDisableInteractiveMode(C context, boolean proposedInteractive) protected voidpopulateRequest(C context, Lookup lookup, MavenExecutionRequest request) protected voidpopulateRequestFromSettings(MavenExecutionRequest request, Settings settings) protected voidpostCommands(C context) protected voidpostContainer(C context) protected voidpreCommands(C context) protected voidprotected voidpushCoreProperties(C context) protected voidpushUserProperties(C context) protected voidprotected voidsettings(C context, SettingsBuilder settingsBuilder) protected voidshowVersion(C context) protected void
-
Field Details
-
protoLookup
-
-
Constructor Details
-
LookupInvoker
-
-
Method Details
-
invoke
Description copied from interface:InvokerInvokes the Maven application using the providedInvokerRequest. This method is responsible for executing the Maven command or build process based on the information contained in the request.- Specified by:
invokein interfaceInvoker- Parameters:
invokerRequest- the request containing all necessary information for the invocation- Returns:
- an integer representing the exit code of the invocation (0 typically indicates success)
- Throws:
InvokerException- if an error occurs during the invocation process
-
doInvoke
- Throws:
Exception
-
handleException
- Throws:
InvokerException
-
createContext
- Throws:
InvokerException
-
pushCoreProperties
- Throws:
Exception
-
pushUserProperties
- Throws:
Exception
-
validate
- Throws:
Exception
-
prepare
- Throws:
Exception
-
configureLogging
- Throws:
Exception
-
createTerminal
-
doConfigureWithTerminal
-
determineWriter
-
doDetermineWriter
-
activateLogging
- Throws:
Exception
-
helpOrVersionAndMayExit
- Throws:
Exception
-
showVersion
-
describe
-
preCommands
- Throws:
Exception
-
container
- Throws:
Exception
-
createContainerCapsuleFactory
-
postContainer
- Throws:
Exception
-
lookup
- Throws:
Exception
-
init
- Throws:
Exception
-
postCommands
- Throws:
Exception
-
settings
- Throws:
Exception
-
settings
- Throws:
Exception
-
customizeSettingsRequest
protected void customizeSettingsRequest(C context, SettingsBuilderRequest settingsBuilderRequest) throws Exception - Throws:
Exception
-
customizeSettingsResult
protected void customizeSettingsResult(C context, SettingsBuilderResult settingsBuilderResult) throws Exception - Throws:
Exception
-
mayDisableInteractiveMode
-
localRepositoryPath
-
populateRequest
protected void populateRequest(C context, Lookup lookup, MavenExecutionRequest request) throws Exception - Throws:
Exception
-
populateRequestFromSettings
protected void populateRequestFromSettings(MavenExecutionRequest request, Settings settings) throws Exception - Throws:
Exception
-
calculateDegreeOfConcurrency
-
isRunningOnCI
-
execute
- Throws:
Exception
-