-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Maven Resolver: fix discovering settings-security.xml #46271
Maven Resolver: fix discovering settings-security.xml #46271
Conversation
@@ -533,7 +533,18 @@ private DefaultRepositorySystemSession newRepositorySystemSession() throws Boots | |||
DefaultSettingsDecryptionRequest decrypt = new DefaultSettingsDecryptionRequest(); | |||
decrypt.setProxies(settings.getProxies()); | |||
decrypt.setServers(settings.getServers()); | |||
// need to set `settings-security.xml` location extra, because it isn't discovered | |||
// by BeanBag when constructing `DefaultSecDispatcher` |
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.
Should it be? Or this is the experted behavior?
Wondering as it would be nice not having to think about that every time.
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.
This code existed before my previous PR, where I tried to make the code a lot closer to the Maven original. The comment explains why it was there and why it should be there again.
I'm honestly not sure whether BeanBag actually could discover the location itself, it's declared as
@Inject
public DefaultSecDispatcher( final PlexusCipher _cipher,
final Map<String, PasswordDecryptor> _decryptors,
@Named( "${_configurationFile:-" + DEFAULT_CONFIGURATION + "}" )
final String _configurationFile )
{
...
}
It seems to me that this is out of BeanBag's reach.
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.
Yeah, it's not the best but that's what we had before, e.g. https://github.com/quarkusio/quarkus/blob/3.15/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java#L541-L549
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.
Thanks @Ladicek
This comment has been minimized.
This comment has been minimized.
.../maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/BootstrapMavenContext.java
Outdated
Show resolved
Hide resolved
3aba510
to
b435ed7
Compare
Status for workflow
|
Follows up on #45794
Fixes #46260