Trailing slash issue or feature at GradlePluginPortal

Hi

when I get GPP directory with the trailing slash:
https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/

I am getting a redirection with malformed URL (double slash befor “org”)
https://repo.maven.apache.org/maven2//org/sonarsource/scanner/api/sonar-scanner-api/

when there is no trailing slash
https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api
the redirection works nice
https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/

is it intentional or just a side effect?

I would assume this is a bug, maybe introduced with the change to redirect to MC instead of JC.
You should probably open an issue on GitHub - gradle/plugin-portal-requests: Gradle Plugin Portal issues and requests.

1 Like

Thank you Vamp,

(I have filed that issue there)
What about the other one below.
I can see your comment in the old discussion of Gradle fails dependency retrieval if HTTP HEAD is not supported by the repository · Issue #5322 · gradle/gradle · GitHub
but cannot clearly understand how(and by whom) the method is changed form GET to HEAD
I suppose the server is redirecting, but who is “lightenning” the http method (server, proxy, Gradle client itself). I am trying to understand that to fix the issue with our caching proxy artifactory repo, that points to the remotes (MC).

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.sonarsource.scanner.api:sonar-scanner-api:2.16.2.588.
Required by:
project : > org.sonarqube:org.sonarqube.gradle.plugin:4.4.1.3373 > org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373
Could not resolve org.sonarsource.scanner.api:sonar-scanner-api:2.16.2.588.
Could not get resource ‘https://plugins.gradle.org/m2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.pom’.
Could not HEAD ‘https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.pom’. Received status code 500 from server: Internal Server Error

Noone lightens it.
Gradle is using a HEAD request directly.

1 Like

Thanks a lot, I could trace it with netstat, but your quick answer helps to diagnose the issue on the http proxy.

1 Like