Maven Core
Maven Core classes managing the whole build process.
Reference Documentation
- lifecycles and plugin bindings to
default
lifecycle, - default artifact handlers, to manage dependency types,
- extension descriptor and core extensions,
- classloader hierarchy done by
ClassRealmManager
component (javadoc), with itsDefaultClassRealmManager
implementation (source), using Plexus Classworlds,
Useful entry points
Maven
component (javadoc), with itsDefaultMaven
implementation (source), to drive a full Maven execution sessionProjectBuilder
component (javadoc), with itsDefaultProjectBuilder
implementation (source), to prepareMavenProject
descriptor from POM files,LifecycleExecutor
component (javadoc), with itsDefaultLifecycleExecutor
implementation(source), to plan or execute tasks.
on plugin goals execution order:- in a given phase, goals order is not expected to be guaranteed nor finely tuned: it is just a consequence of the order obtained during effective model building, which combines profile activation+injection and inheritance assembly from parents,
- known limitations are notably that:
1. plugin goal execution in a child is usually simply appended (at end): you can't try to insert in the middle of pre-existing inherited executions,
2. append happens at plugin level first, then goal level, independently from phases. This means for example that adding pluginA:goal2 to pre-existing (pluginA:goal1, pluginB:goal) will lead to (pluginA:goal1, pluginA:goal2, pluginB:goal)
- see effective POM as shown by
help:effective-pom
to see the effective plugins then goals order.
MavenPluginManager
component (javadoc), with itsDefaultMavenPluginManager
implementation (source),- PluginParameterExpressionEvaluator, used to evaluate plugin parameters values during Mojo configuration,
ExceptionHandler
component (javadoc), with itsDefaultExceptionHandler
implementation (source), use to transform exception into useful end-user messages.
Toolchains
- Toolchains descriptor reference,
- public API for toolchains-aware plugins:
ToolchainManager
component (javadoc) with itsDefaultToolchainManager
implementation (source), to get selectedToolchain
(javadoc) instance, - internal
ToolchainManagerPrivate
component (javadoc) with itsDefaultToolchainManagerPrivate
implementation (source), to manage toolchain selection, - internal JDK toolchain implementation:
JavaToolchain
interface (javadoc), with itsJavaToolchainImpl
implementation (source) andJavaToolchainFactory
factory (source).