[ https://issues.apache.org/jira/browse/MRESOLVER-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898048#comment-17898048 ]
ASF GitHub Bot commented on MRESOLVER-627: ------------------------------------------ cstamas commented on PR #599: URL: https://github.com/apache/maven-resolver/pull/599#issuecomment-2474774728 > I don't have an opinion on this. Sure, no problem. But let me explain what was initial cause for this PR: We knew that JDK transport cannot handle HTTP/2 `GOAWAY`, and recently we saw a surge in ITs and other jobs getting it, so we decided to _force_ HTTP/1.1 while keeping JDK transport in use. I did that by creating `.mvn/maven.config` in maven and mvnd projects... then I went to check "effects" using `-X` locally and was **very surprised to see that Maven started using Apache transporter instead**. Basically, turned out my config had wrong value (a typo), and even `-X` did not report this, instead all I saw in debug logs is that Maven uses Apache transport.... turned out, this typo was interpreted as "not my protocol" by JDK transport, and it made Maven select next available HTTP Transporter that was Apache. Very confusing. Hence, this PR now: * logs every transport "disqualification" (in DEBUG) instead only when no transport could be selected * fails the build if any transport is mis-configured > Improve handling and logging around transport selection > ------------------------------------------------------- > > Key: MRESOLVER-627 > URL: https://issues.apache.org/jira/browse/MRESOLVER-627 > Project: Maven Resolver > Issue Type: Improvement > Components: Resolver > Affects Versions: 2.0.3 > Reporter: Tamas Cservenak > Priority: Major > Fix For: 2.0.4 > > > Currently what transport is being used by Resolver is fully black box. > Examples: > * configure Maven 4 that by default would use JDK transport, create > {{.mvn/maven.config}} file with contents > {{-Daether.transport.jdk.httpVersion=HTTP_1_2}} (intentional typo). What > happens: Maven 4 will work but use Apache Transport. > * configure Maven 4 to use S3 transport but do not provide auth config. What > happens? Dependending on config, either some other transport will be selected > (and fail), or Resolver will tell "no available transport", which is untrue. > * even in Maven -X resolver reports only what is to be used, but not why some > transport was ignored/skipped (see case 1: jdk transport bad config) > In both cases, Resolver config is bad, but: > * it is not reported anywhere > * in fact, it is silently ignored and Resolver continues like nothing happened -- This message was sent by Atlassian Jira (v8.20.10#820010)