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, org.apache.maven.api.services.SettingsBuilderRequest settingsBuilderRequest) protected voidcustomizeSettingsResult(C context, org.apache.maven.api.services.SettingsBuilderResult settingsBuilderResult) protected Stringdescribe(org.jline.terminal.Terminal terminal) protected BuildEventListenerdetermineBuildEventListener(C context) determineWriter(C context) protected voiddoConfigureWithTerminal(C context, org.jline.terminal.Terminal terminal) protected BuildEventListenerdoDetermineBuildEventListener(C context) doDetermineWriter(C context) protected intprotected abstract intprotected InvokerExceptionhandleException(C context, Exception e) protected voidhelpOrVersionAndMayExit(C context) protected voidintinvoke(InvokerRequest invokerRequest) protected booleanisRunningOnCI(C context) protected PathlocalRepositoryPath(C context) protected voidprotected booleanmayDisableInteractiveMode(C context, boolean proposedInteractive) protected voidpopulateRequest(C context, org.apache.maven.api.services.Lookup lookup, MavenExecutionRequest request) protected voidpopulateRequestFromSettings(MavenExecutionRequest request, org.apache.maven.api.settings.Settings settings) protected voidpostCommands(C context) protected voidpostContainer(C context) protected voidpreCommands(C context) protected voidprotected voidpushCoreProperties(C context) protected voidpushUserProperties(C context) Note: this method is called twice fromdoInvoke(LookupContext)and modifies context.protected voidprotected voidsettings(C context, boolean emitSettingsWarnings, org.apache.maven.api.services.SettingsBuilder settingsBuilder) This method is invoked twice during "normal" LookupInvoker level startup: once when (if present) extensions are loaded up during Plexus DI creation, and once afterward as "normal" boot procedure.protected voidshowVersion(C context) protected void
-
Field Details
-
protoLookup
-
-
Constructor Details
-
LookupInvoker
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceInvoker- Throws:
InvokerException
-
doInvoke
- Throws:
Exception
-
handleException
- Throws:
InvokerException
-
createContext
- Throws:
InvokerException
-
pushCoreProperties
- Throws:
Exception
-
pushUserProperties
Note: this method is called twice fromdoInvoke(LookupContext)and modifies context. First invocation whenLookupContext.pushedUserPropertiesis null will push user properties IF key does not already exist among Java System Properties, and collects all they key it pushes. Second invocation happens AFTERPropertyContributorSPI invocation, and "refreshes" already pushed user properties by re-writing them as SPI may have modified them.- Throws:
Exception
-
validate
- Throws:
Exception
-
prepare
- Throws:
Exception
-
configureLogging
- Throws:
Exception
-
determineBuildEventListener
-
doDetermineBuildEventListener
-
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
protected void settings(C context, boolean emitSettingsWarnings, org.apache.maven.api.services.SettingsBuilder settingsBuilder) throws Exception This method is invoked twice during "normal" LookupInvoker level startup: once when (if present) extensions are loaded up during Plexus DI creation, and once afterward as "normal" boot procedure.If there are Maven3 passwords presents in settings, this results in doubled warnings emitted. So Plexus DI creation call keeps "emitSettingsWarnings" false. If there are fatal issues, it will anyway "die" at that spot before warnings would be emitted.
- 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
-
localRepositoryPath
-
populateRequest
protected void populateRequest(C context, org.apache.maven.api.services.Lookup lookup, MavenExecutionRequest request) throws Exception - Throws:
Exception
-
populateRequestFromSettings
protected void populateRequestFromSettings(MavenExecutionRequest request, org.apache.maven.api.settings.Settings settings) throws Exception - Throws:
Exception
-
calculateDegreeOfConcurrency
-
isRunningOnCI
-
execute
- Throws:
Exception
-