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

WebClient is obsolete #75

Open
flaviogrodrigues opened this issue Nov 24, 2023 · 1 comment
Open

WebClient is obsolete #75

flaviogrodrigues opened this issue Nov 24, 2023 · 1 comment

Comments

@flaviogrodrigues
Copy link

The Antlr4BuildTasks is still using WebClient to download java and antlr jar.

The WebClient class is marked as obsolete and generate a SYSLIB0014 warning at compile time:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/6.0/webrequest-deprecated

Occasionally I got the following error downloading https://repo1.maven.org/maven2/org/antlr/antlr4/4.13.1/antlr4-4.13.1-complete.jar:

Problem downloading or saving probed file.

It might be related to the WebClient / SSL protocols.

Recommended action

Use the System.Net.Http.HttpClient class instead, with TLS 1.2 security protocol. I tested it locally and it seems to have solved the issue.

@kaby76
Copy link
Owner

kaby76 commented Nov 24, 2023

Replaced WebClient using HttpClient calls. The Maven Central errors are caused by Maven Central being super slow. I don't think there server can handle a lot of traffic. Occasionally, we see this in the grammars-v4 builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants