Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7432

[REGRESSION] Resolver session contains non-MavenWorkspaceReader

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.8.5
    • 3.8.6, 3.9.0, 4.0.0-alpha-2, 4.0.0
    • None
    • None

    Description

      As Resolver session contains non-MavenWorkspaceReader, the reactor models (already resolved w/ profiles applied) are re-built when using Resolver within Mojo, instead to get them via ReactorReader as expected. The rebuilt models will lack explicit (-P on CLI) profiles applied, as resolver itself is not maven aware, hence there is no way to "tell" resolver to apply them. Building reactor models w/ profiles applied is NOT done using resolver, but by Maven when loading up reactor, as profiles are NOT applied for downstream transitive dependencies (see discussion on MNG-1388 why).

      The README of the following reproducer says it all:
      https://github.com/aloubyansky/playground/tree/maven-3.8.5-profile-activation

      Initially discussed here: https://github.com/quarkusio/quarkus/pull/24285#issuecomment-1067368625

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cstamas Tamas Cservenak
            famod Falko Modler
            Votes:
            2 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment