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-5577: convert remaining non core/compat modules #255

Conversation

josephw
Copy link
Contributor

@josephw josephw commented Jun 19, 2019

Further conversion to JSR 330 annotations, following Plexus Migration -- everything outside core and compat, with some test changes to adjust.

This incorporates #232 by @slachiewicz, but omits the logging change in 39ca59d to focus on the annotations.

In tests, use of PlexusTestCase for trivial wiring is reduced, to directly construct the classes under test. Tests that do more significant wiring are modified to use PlexusConstants.SCANNING_ON so JSR 330-annotated classes no longer included in component indexes are picked up.

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] - Fixes bug in ApproximateQuantiles,
    where you replace MNG-XXX 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.

slachiewicz and others added 8 commits June 17, 2019 00:52
Switch (most) @components in maven-model-builder to javax.inject's
annotations.

Leave DefaultModelBuilder and DefaultProfileSelector as-is due
to their use of optional injection and injecting collections.
Make the tests in maven-model-builder work with non-Plexus
components.

- Construct directly, rather than via Plexus, where it's simpler
- Enable classpath scanning in tests so that the JSR330 annotations
   are picked up.
This test is already commented out; @ignore it as well,
rather than making changes.
- Remove more use of PlexusTestCase
- Mark DefaultModelReader so it's preferred over DefaultModelProcessor,
   to prevent circular wiring.
- Require classpath scanning when testing injection of ProfileActivators
With unit tests passing to confirm that @Inject behaves with
Lists, convert this class.
@josephw josephw force-pushed the MNG-5577-convert-remaining-non-core-modules branch from 9940d04 to 4217373 Compare June 19, 2019 12:41
Sisu understands that @nullable things are optional. Use that to
convert the remaining class in maven-model-builder.
@michael-o
Copy link
Member

I would really prefer to have seperate tickets and PRs for each module. I don't want to review and merge so many changes at once.

@michael-o
Copy link
Member

Thank you for your hard work!

@josephw
Copy link
Contributor Author

josephw commented Jun 20, 2019

That's reasonable; I've created subtasks of MNG-5577:

and I'll split this into separate PRs against the first two.

@josephw josephw closed this Jun 20, 2019
@josephw josephw deleted the MNG-5577-convert-remaining-non-core-modules branch June 30, 2019 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants