-
Notifications
You must be signed in to change notification settings - Fork 69
Add support for the central mirror #397
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
Conversation
983e02d to
17e7275
Compare
laeubi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks sane to me and like something that can help users.
Even though central is not strictly "in maven" it is on the super-pom / settings. Even if that (unlikely) ever changes having this now do not harms.
Adds support for using the `central` mirror defined in `settings.xml` when resolving Maven Wrapper distribution downloads.
Thanks for the feedback. Unfortunately, I had some linting issues that I had to push back, hopefully CI passes now |
cstamas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not enough
|
Check this page "Advanced Mirror Specification" section: MirrorOf possible values:
|
|
@cstamas I think it is to much to ask to support the full range I think, of course if there are demands people can extend this more and more... so why not starting small here? |
|
My stance is that code is done wrongly. It is not (raw) settings that needs to be used, and hence, have replicate/redo all the logic. Instead, code needs to use different APIs. Will craft a PR once there. |
|
Proposed alt (and complete) solution in #399 |
|
Closing in favor of #399 as the solution seems better and solves the same problem |
Summary
This PR adds support for using the
centralmirror defined insettings.xmlwhen resolving Maven Wrapper distribution downloads.Today, the wrapper plugin only applies a configured mirror if it is defined as
*. This change allows the wrapper to work correctly in those environments by honoring thecentralmirror as well.What changed
centralinsettings.xml*andcentralmirrors are present, the existing*behaviour remains supportedFixes #396
Your pull request should address just one issue, without pulling in other changes.
Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
Each commit in the pull request should have a meaningful subject line and body.
Note that commits might be squashed by a maintainer on merge.
Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
This may not always be possible but is a best-practice.
Run
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
You have run the integration tests successfully (
mvn -Prun-its verify).I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.