Class ResidentMavenInvoker
java.lang.Object
org.apache.maven.cling.invoker.LookupInvoker<MavenContext>
org.apache.maven.cling.invoker.mvn.MavenInvoker
org.apache.maven.cling.invoker.mvn.resident.ResidentMavenInvoker
- All Implemented Interfaces:
AutoCloseable,Invoker
Resident invoker implementation, specialization of Maven Invoker, but keeps Maven instance resident. This implies, that
things like environment, system properties, extensions etc. are loaded only once. It is caller duty to ensure
that subsequent call is right for the resident instance (ie no env change or different extension needed).
This implementation "pre-populates" MavenContext with pre-existing stuff (except for very first call)
and does not let DI container to be closed.
-
Field Summary
Fields inherited from class org.apache.maven.cling.invoker.mvn.MavenInvoker
ANSI_RESET, LAST_ANSI_SEQUENCE, NEXT_LINEFields inherited from class org.apache.maven.cling.invoker.LookupInvoker
contextConsumer, protoLookup -
Constructor Summary
ConstructorsConstructorDescriptionResidentMavenInvoker(Lookup protoLookup, Consumer<LookupContext> contextConsumer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes and disposes of thisInvokerinstance, releasing any resources it may hold.protected MavenContextcopyIfDifferent(MavenContext mavenContext, InvokerRequest invokerRequest) protected MavenContextcreateContext(InvokerRequest invokerRequest) Methods inherited from class org.apache.maven.cling.invoker.mvn.MavenInvoker
determineExecutionListener, determineGlobalChecksumPolicy, determineMakeBehavior, determinePom, determineReactorFailureBehaviour, determineTransferListener, doExecute, execute, getResumeFromSelector, logBuildResumeHint, logSummary, lookup, performProfileActivation, performProjectActivation, populateRequest, postCommands, prepareMavenExecutionRequest, toolchainsMethods inherited from class org.apache.maven.cling.invoker.LookupInvoker
activateLogging, calculateDegreeOfConcurrency, configureLogging, container, createContainerCapsuleFactory, createCoreExtensionSelector, createTerminal, customizeSettingsRequest, customizeSettingsResult, describe, determineBuildEventListener, determineWriter, doConfigureWithTerminal, doConfigureWithTerminalWithRawStreamsDisabled, doConfigureWithTerminalWithRawStreamsEnabled, doCreateTerminal, doDetermineBuildEventListener, doDetermineWriter, doInvoke, handleException, helpOrVersionAndMayExit, init, invoke, localRepositoryPath, mayDisableInteractiveMode, populateRequestFromSettings, postContainer, preCommands, printErrors, pushCoreProperties, pushUserProperties, settings, settings, showVersion, validate
-
Constructor Details
-
ResidentMavenInvoker
-
-
Method Details
-
close
Description copied from interface:InvokerCloses and disposes of thisInvokerinstance, releasing any resources it may hold. This method is called automatically when using try-with-resources statements.The default implementation does nothing. Subclasses should override this method if they need to perform cleanup operations.
- Throws:
InvokerException- if an error occurs while closing theInvoker
-
createContext
- Overrides:
createContextin classMavenInvoker
-
copyIfDifferent
-