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

[3.8.x][MNG-7400] - Allow more WorkspaceReader's to participate #668

Closed
wants to merge 1 commit into from

Conversation

laeubi
Copy link

@laeubi laeubi commented Jan 29, 2022

This is a backport of #667

we at Tycho have a high demand in integrating better with maven to reduce some workarounds that where used in the past to get custom dependency types into the maven dependency model (namely using system scoped absolute paths).

For that reason it would help if it where possible to register additional WorkspaceReader to participate.

I have created a prototype to show/test this new feature.

FYI @mickaelistria @akurtakov

This PR allows maven-extensions to supply WorkspaceReader as it is possible with AbstractMavenLifecycleParticipant currently it is only possible with some workarounds:

  1. One needs to register a AbstractMavenLifecycleParticipant in a maven-core-extension
  2. In the afterSessionStart cast the RepositorySystemSession to DefaultRepositorySystemSession
  3. Call setWorkspaceReader and take care not to replace an already exiting one

With this change it is possible to simply register WorkspaceReader component directly and Maven takes care of all the rest.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY, where you replace MNG-XXX
    and SUMMARY with the appropriate JIRA issue. Best practice is to use the JIRA issue
    title in the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@laeubi
Copy link
Author

laeubi commented Jan 31, 2022

@gnodet thanks for reviewing this, I found a small issue that the ReactorReader was added twice to the list, I fixed this now.

@laeubi laeubi force-pushed the MNG-7400-3.8.x branch 2 times, most recently from 8f91e6d to 0dab045 Compare January 31, 2022 15:36
@gnodet gnodet requested a review from michael-o January 31, 2022 18:55
@gnodet gnodet changed the title Backport of MNG-7400 - Allow more WorkspaceReader's to participate [3.8.x][MNG-7400] - Allow more WorkspaceReader's to participate Jan 31, 2022
@michael-o michael-o removed their request for review February 1, 2022 11:39
@laeubi
Copy link
Author

laeubi commented Feb 1, 2022

@gnodet anything left here to do until it could be merged?

@gnodet
Copy link
Contributor

gnodet commented Feb 1, 2022

@michael-o is the release manager for 3.8.x branch, so I'll defer to him

Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please synchronize with master.

@michael-o
Copy link
Member

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants