Skip to content

[MNG-7774] Maven config and command line interpolation #9211

@jira-importer

Description

@jira-importer

Tamas Cservenak opened MNG-7774 and commented

Note: this issue "mildly follows" functionality done in Maven 4 as part of MNG-7038 and MNG-6303, with partial implementation only (is not full back-port), hence "mild introduction".

Rationale: many new resolver features are akin to be able to store their configuration and input along SCM tracked Maven project sources. Sadly, currently this is not possible. The two issues targeting Maven4 (MNG-7038 and MNG-6303) with introduction of session and project "topDirectory" and "rootDirectory" properties solve this. Still, Maven 3.9.x does not need all of this.

So, idea is following:

  • extend MavenCli to interpolate Maven arguments
  • introduce two special properties session.rootDirectory and session.topDirectory in interpolation. They are special, as they may not be defined, and IF they are not defined, their use in Maven argument interpolation causes error (Maven will not boot).
  • limit the use of the two new properties to Maven CLI interpolation only. This makes projects relying on Maven CLI interpolation "permeable" between Maven 3.9.x and Maven 4, while all the whistle and bells (exposing this via session or project) will be available in Maven 4 only.

Issue Links:

  • MRESOLVER-304 DirectoryUtils should consider interpolation
    ("fixes")

  • MNG-7796 Top directory cannot be computed
    ("causes")

  • MNG-6303 Interpolate user supplied properties and command line arguments

  • MNG-7038 Introduce public properties to point to the root and top directories of (multi-module) project

Remote Links:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions