Skip to content

[MNG-8052] Define a new lifecycle for Maven 4 #9821

@jira-importer

Description

@jira-importer

Guillaume Nodet opened MNG-8052 and commented

The lifecycle is now defined as a tree of phases, each phase being split with a before: phase and a after: 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).
The default lifecycle is defined in the DefaultLifecycleRegistry.

In addition to the before: and after: prefixes, an ordering can be defined by appending an integer inside brackets, for example, after:integration-test[1000].

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, nor 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. The install and deploy phases now depends on package, but not verify (and deploy does not require install). This currently only has an effect when calling mvn deploy with the concurrent builder (see MNG-8225).

It's missing the ability to create some scheduling constraints in the POM and to define custom phases. All executions in a given phase such as compile or after: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.


Sub-tasks:

  • MNG-7633 Add process-package lifecycle phase

Issue Links:

  • MNG-7633 Add process-package lifecycle phase
    ("contains")

  • MNG-7860 Interleaving of build phases
    ("incorporates")

  • MNG-5668 The concurrent builder should always run after:xxx phase if before:xxx phase has been started

  • MNG-8246 Calling pre-clean results in calling before:clean/clean/after:clean

  • MNG-8234 Revert the addition of the priority tag

  • MNG-8213 Expose most important phases as constants

Remote Links:

Backported to: 4.0.0-beta-4

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions