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
settings.xml proxy not being honored #224
Comments
The reason this doesn't work properly is the deprecated
Using the more modern plugin API, you can simple do this:
What am I missing? |
I'm working on a PR which is doing away with |
Not ready yet since I'm working on replacing the Maven 2 artefacts in the Optional.ofNullable(this.session.getRepositorySession().getProxySelector())
.flatMap(selector -> Optional.ofNullable(selector.getProxy(repository)))
.ifPresent(proxy -> ... to retrieve the proxy and it does seem to use an http proxy for https targets. |
@longtimeago could you please assign this one to me? Thanks. |
Resolves maven-download-plugin#224 Replacing Maven 2 APIs with modern ones.
Resolves maven-download-plugin#224 Replacing Maven 2 APIs with modern ones.
I have a similar issue. |
I think this can be closed. |
@ajarmoniuk How can this be closed? There has been no new release of the plugin so any changes/fixes that might have been made are still unreleased. @longtimeago Can we please get a new release? |
@robertpatrick we close issues when the fix is merged, not when it's released. Because, technically (I don't encourage that in any way), you can use fixed snapshot version already. But you are right, it's time for a release |
What release is this fixed in? I've tried 1.7.1 and it still is not working through a proxy (the rest of maven downloads work fine). |
In 1.7.1. We replaced Wagon with Maven Resolver transport. I only tested this manually against a proxy and it worked fine, including proxy auth. However, I have no details on the particular proxy nor any logs at hand. There might be different reasons a feature might not work, so debug logs (with -X) are highly appreciated. Thanks. |
For reference testing, I try to compile/install a direct clone of this plugin: https://github.com/5aab/randoop-maven-plugin (I only change the version number for the maven-download-plugin to 1.7.1). I've tried on my windows machine with a proxy setting.xml set correctly. I've also tried building within an ubuntu development container with proxy set through docker -- everything else downloads correctly in maven, but wget cannot (slightly different logs). I can download the file in my browser, and even using wget on the command line fine. See attachments. I do notice in the browser it takes a while to establish connection -- is there a way to increase the read timeout? |
Hi, both connection timeout as well as socket timeout are equal to the Could you try changing that and report back? Thanks. |
Ok -- I added this to the plugin configuration and that is letting me download and unpack from my docker development container now, which I believe bypasses any need for proxy settings (b/c it's set in docker).
But for my windows environment, same "Connect to github.com:443 [github.com/140.82.113.3] failed: Connection timed out: no further information" message. It doesn't seem to matter what I set the proxy to there, it will still timeout. And it doesn't seem to wait any longer with the readTimeOut setting. |
It's indeed |
I will test this and report back. |
This is definitely working now! Thanks so much |
I have an entry that looks like this in
settings.xml
(note I have redacted DNS names due to my company policies):In my pom file, I have this:
When I run the build, I get this:
If I download a file from a server inside the firewall, everything works perfectly. Seems like this plugin is not honoring the settings.xml proxy settings even though the source looks like it should.
The text was updated successfully, but these errors were encountered: