Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-5668] Proof of concept implementation of dynamic phases (wip) #1448

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 21, 2024

The lifecycle is defined as a tree, of phases, each phase being split with a pre: phase and a post: phase. Each phase is given a list of timing constraints: a phase from the same lifecycle (compile must be executed after sources), a phase in project dependencies (compile must execute after compile-only project dependencies have reached the ready phase), or a set of children project dependencies (to re-define aggregators, not yet implemented).
The default lifecycle is defined in the DefaultLifecycleRegistry

Note that there are a few changes with the Maven 3 default lifecycle: it's a graph, so sources does not always execute after resources, not compile after resources. Also, unit tests and integration tests have been moved to the verify phase which is run last inside the build phase, but not in the package phase. The goal is to have a phase (here, package which can run all the reactor with no tests). In order to be compatible, old phases are mapped to new ones using aliases.

It's missing the ability to create some scheduling constraints in the POM and to define custom phases. All executions in a give phase such as compile or process-sources are executed sequentially, but it would be nice to be able to execute them in different subphases, so that they could be executed concurrently.

WIP, related to #1411 and #1429

gnodet and others added 2 commits March 21, 2024 16:58
# Conflicts:
#	api/maven-api-plugin/src/main/mdo/lifecycle.mdo
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleMappingDelegate.java
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/PhaseRecorder.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants