You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2026/04/14 19:18:02 UTC
[PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
slawekjaranowski opened a new pull request, #1830:
URL: https://github.com/apache/maven-resolver/pull/1830
Repository should be already configured, it is too late to change configuration. The same configuration should be used for standard operation and resolving metadata.
Example: plugins can provide unconfigured repo,
when we have configuration for mirror in settings - mirror will be used only for metadata.
---
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] 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 verify` to 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`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) 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](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4246604725
> Example: plugins can provide unconfigured repo,
when we have configuration for mirror in settings - mirror will be used only for metadata.
Are you sure about this? This sounds wrong...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4246847174
Why we need to reconfigure repo ... it should be already done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4246742462
> > Example: plugins can provide unconfigured repo,
> > when we have configuration for mirror in settings - mirror will be used only for metadata.
>
> Are you sure about this? This sounds wrong...
I discovered it by using `wildfly-maven-plugin`, which manually add repsitories:
https://github.com/wildfly/wildfly-maven-plugin/blob/3c924bc6d07cccd3954dfd28811364044c1f2f7a/core/src/main/java/org/wildfly/plugin/core/MavenRepositoriesEnricher.java
only proxy is configured here (also manually),
I have configured mirrors in my settings.
I such case in normal resolutions, mirrors are not used ... but for prefixes metadata we add mirror ...
My debug session show:
<img width="987" height="353" alt="image" src="https://github.com/user-attachments/assets/576f08c6-4179-42ff-805b-d0c32baa6634" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4254859981
So if:
> Moreover, the method newResolutionRepositories is not and cannot be idempotent, hence, we (resolver) cannot just invoke that method over and over again, as it will create issues with setups like mirrorOf: *.
we also should not call `aggregateRepositories`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4249735508
I know that `newResolutionRepositories` should be used .... but what if autor of plugin doesn't use it? it is my case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4246976699
See https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/RepositorySystem.java#L312
In fact, see whole Resolver API: all methods _references_ this method above. This is resolver expectation. IF user has set up mirror, it has to be obeyed, I cannot today, but pls ping me on Slack tomorrow to discuss this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4250683975
That is clearly a bug then. In 90% of cases, when plugin operates on received repositories, Maven already primed them. But, if plugin _creates_ new `RemoteRepository` instances, that is a bug.
Moreover, the method `newResolutionRepositories` is not and cannot be idempotent, hence, we (resolver) cannot just invoke that method over and over again, as it will create issues with setups like `mirrorOf: *`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawomir-jaranowski-payu-gpo (via GitHub)" <gi...@apache.org>.
slawomir-jaranowski-payu-gpo commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4252106772
I agree that it is a bug in plugin .... but I think that next reconfiguration is not required
and introduce some of inconsistency
- when use such repo for standard resolving we use it as is
- when used for resolving meta-data we change configuration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove unnecessary repository preparation in metadata resolution for prefixes [maven-resolver]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1830:
URL: https://github.com/apache/maven-resolver/pull/1830#issuecomment-4252114901
I agree that it is a bug in plugin .... but I think that next reconfiguration is not required
and introduce some of inconsistency
when use such repo for standard resolving we use it as is
when used for resolving meta-data we change configuration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org