Package org.apache.maven
Class DefaultMaven
java.lang.Object
org.apache.maven.DefaultMaven
- All Implemented Interfaces:
Maven
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BuildResumptionAnalyzerprivate final BuildResumptionDataRepositoryprivate final DefaultSessionFactoryprivate final ExecutionEventCatapultprivate final GraphBuilderprivate final org.eclipse.aether.repository.WorkspaceReaderprivate final LegacySupportprivate final org.slf4j.Loggerprivate final Lookupprivate final ProjectSelectorprivate final RepositorySystemSessionFactoryprivate final SessionScopeprivate final SuperPomProvider -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMaven(Lookup lookup, ExecutionEventCatapult eventCatapult, LegacySupport legacySupport, SessionScope sessionScope, RepositorySystemSessionFactory repositorySessionFactory, GraphBuilder graphBuilder, BuildResumptionAnalyzer buildResumptionAnalyzer, BuildResumptionDataRepository buildResumptionDataRepository, SuperPomProvider superPomProvider, DefaultSessionFactory defaultSessionFactory, org.eclipse.aether.repository.WorkspaceReader ideWorkspaceReader) -
Method Summary
Modifier and TypeMethodDescriptionprivate MavenExecutionResultaddExceptionToResult(MavenExecutionResult result, Throwable e) private voidafterProjectsRead(MavenSession session) private voidafterSessionEnd(MavenSession session) private voidafterSessionStart(MavenSession session) private Result<? extends ProjectDependencyGraph> buildGraph(MavenSession session) private voidcallListeners(MavenSession session, DefaultMaven.ListenerMethod method) private MavenExecutionResultdoExecute(MavenExecutionRequest request) private MavenExecutionResultdoExecute(MavenExecutionRequest request, MavenSession session, MavenExecutionResult result, MavenChainedWorkspaceReader chainedWorkspaceReader) execute(MavenExecutionRequest request) getAllProfiles(MavenSession session) Get all profiles that are detected in the projects, any parent of the projects, or the settings.private <T> Collection<T> getExtensionComponents(Collection<MavenProject> projects, Class<T> role) protected org.slf4j.LoggerDeprecated.private Map<String, MavenProject> getProjectMap(Collection<MavenProject> projects) protected <T> Collection<T> getProjectScopedExtensionComponents(Collection<MavenProject> projects, Class<T> role) private org.eclipse.aether.RepositorySystemSession.CloseableSessionnewCloseableSession(MavenExecutionRequest request, org.eclipse.aether.repository.WorkspaceReader workspaceReader) org.eclipse.aether.RepositorySystemSessionDeprecated.If you use this method and your code is not in Maven Core, stop doing this.private voidpersistResumptionData(MavenExecutionResult result, MavenSession session) private voidsetupWorkspaceReader(MavenSession session, MavenChainedWorkspaceReader chainedWorkspaceReader) private voidprivate voidvalidateOptionalProfiles(MavenSession session, ProfileActivation profileActivation) Check whether any of the requested optional profiles were not activated or deactivated.private voidvalidateOptionalProjects(MavenExecutionRequest request, MavenSession session) Check whether any of the requested optional projects were not activated or deactivated.private voidprivate voidvalidateRequiredProfiles(MavenSession session, ProfileActivation profileActivation) Check whether the required profiles were found in any of the projects we're building or the settings.
-
Field Details
-
logger
private final org.slf4j.Logger logger -
lookup
-
eventCatapult
-
legacySupport
-
sessionScope
-
repositorySessionFactory
-
graphBuilder
-
buildResumptionAnalyzer
-
buildResumptionDataRepository
-
superPomProvider
-
defaultSessionFactory
-
ideWorkspaceReader
private final org.eclipse.aether.repository.WorkspaceReader ideWorkspaceReader -
projectSelector
-
-
Constructor Details
-
DefaultMaven
@Inject public DefaultMaven(Lookup lookup, ExecutionEventCatapult eventCatapult, LegacySupport legacySupport, SessionScope sessionScope, RepositorySystemSessionFactory repositorySessionFactory, @Named("graphBuilder") GraphBuilder graphBuilder, BuildResumptionAnalyzer buildResumptionAnalyzer, BuildResumptionDataRepository buildResumptionDataRepository, SuperPomProvider superPomProvider, DefaultSessionFactory defaultSessionFactory, @Nullable @Named("ide") org.eclipse.aether.repository.WorkspaceReader ideWorkspaceReader)
-
-
Method Details
-
execute
-
doExecute
-
doExecute
private MavenExecutionResult doExecute(MavenExecutionRequest request, MavenSession session, MavenExecutionResult result, MavenChainedWorkspaceReader chainedWorkspaceReader) -
setupWorkspaceReader
private void setupWorkspaceReader(MavenSession session, MavenChainedWorkspaceReader chainedWorkspaceReader) -
afterSessionStart
- Throws:
MavenExecutionException
-
afterProjectsRead
- Throws:
MavenExecutionException
-
afterSessionEnd
- Throws:
MavenExecutionException
-
callListeners
private void callListeners(MavenSession session, DefaultMaven.ListenerMethod method) throws MavenExecutionException - Throws:
MavenExecutionException
-
persistResumptionData
-
newRepositorySession
@Deprecated public org.eclipse.aether.RepositorySystemSession newRepositorySession(MavenExecutionRequest request) Deprecated.If you use this method and your code is not in Maven Core, stop doing this.Nobody should ever use this method. -
newCloseableSession
private org.eclipse.aether.RepositorySystemSession.CloseableSession newCloseableSession(MavenExecutionRequest request, org.eclipse.aether.repository.WorkspaceReader workspaceReader) -
validateLocalRepository
- Throws:
IOException
-
getExtensionComponents
-
getProjectScopedExtensionComponents
protected <T> Collection<T> getProjectScopedExtensionComponents(Collection<MavenProject> projects, Class<T> role) -
addExceptionToResult
-
validatePrerequisitesForNonMavenPluginProjects
-
getAllProfiles
Get all profiles that are detected in the projects, any parent of the projects, or the settings.- Parameters:
session- The Maven session- Returns:
- A
Setof profile identifiers, nevernull.
-
validateRequiredProfiles
Check whether the required profiles were found in any of the projects we're building or the settings.- Parameters:
session- the Maven session.profileActivation- the requested optional and required profiles.
-
validateOptionalProjects
Check whether any of the requested optional projects were not activated or deactivated.- Parameters:
request- theMavenExecutionRequest.session- theMavenSession.
-
validateOptionalProfiles
Check whether any of the requested optional profiles were not activated or deactivated.- Parameters:
session- the Maven session.profileActivation- the requested optional and required profiles.
-
getProjectMap
private Map<String,MavenProject> getProjectMap(Collection<MavenProject> projects) throws DuplicateProjectException - Throws:
DuplicateProjectException
-
buildGraph
-
getLogger
Deprecated.
-