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

Maven Jsign Plugin is changing proxy settings #104

Open
BueDo opened this issue Sep 9, 2021 · 3 comments
Open

Maven Jsign Plugin is changing proxy settings #104

BueDo opened this issue Sep 9, 2021 · 3 comments
Labels

Comments

@BueDo
Copy link

BueDo commented Sep 9, 2021

Hallo,

while using JSign-maven-plugin and Proxy-Settings defined in the settings.xml within an multi-module-build it seems the Plugin "loses" the specified nonProxyHosts.
So if you build module A and module B and you are using the Plugin for module A in module B Proxy-Settings without the nonProxyHosts are actively used.
A similar problem was reported here: mojohaus/jaxb2-maven-plugin#60

maybe there is something in common.

Possible fix could be, that the SignHelper is aware of the nonProxyHosts settings and within initializeProxy() this regex would be used for an extra condition within the select method of the anonyme inner class of ProxySelector.

One thing - how fast do you think this change could be deployed?

thanks
Dominic

@ebourg
Copy link
Owner

ebourg commented Sep 9, 2021

Thank you for reporting this issue. The plugin does indeed change the JVM proxy configuration after loading the proxy parameters from the Maven settings, but it doesn't honor the nonProxyHosts parameter. jaxb2 solved this issue by restoring the previous proxy settings after running. I fail to understand why Maven doesn't handle the proxy configuration itself since it holds the settings.

@BueDo
Copy link
Author

BueDo commented Sep 9, 2021

i totally understand you and i also expected a behavior like you have described.

haha i nearly get insane while figuring out why always the proxy is used while it shouldn't.

@ebourg ebourg changed the title Maven JSign Plugin 4.0 is changing Proxy-Settings Maven Jsign Plugin is changing proxy settings Sep 10, 2021
@ebourg
Copy link
Owner

ebourg commented Sep 10, 2021

I think if the Jsign Maven plugin has to configure the proxy used by the JVM it should handle the nonProxyHosts parameter. Proxy settings could be defined in the Maven configuration with the timestamping URL matching the nonProxyHosts pattern. In this case the timestamping would fail.

Either this, or figure out how to let Maven handle the proxy configuration itself.

I don't have the time to work on this right now, but if someone wants to send a PR I can review and merge it.

@ebourg ebourg added the bug label Sep 10, 2021
@ebourg ebourg added this to the 4.1 milestone Sep 10, 2021
@ebourg ebourg removed this from the 4.1 milestone Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants