quarkus: Maven proxy usage is broken with Quarkus 3.0.2.Final
Describe the bug
Hi folks,
Unfortunately, with Quarkus 3 the proxy usage is not working anymore, at least in case proxy authentication (e.g. basic auth) is required. I’ve created a reproducer which should help to analyze the issue.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
- Clone https://github.com/techspace-de/quarkus3-proxy-auth-issue (Quarkus default app generated with
Quarkus cli) - You might need to update
tinyproxy.confto access the proxy within your local network. CurrentlyAllow 172.0.0.0/8is configured - Start
tinyproxyviadocker compose up -d - Execute
./mvnw clean test -s settings.xml
Build should fail with the following error: 407 Proxy Authentication Required
[ERROR] Plugin org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-failsafe-plugin:jar:3.0.0-M7: Could not transfer artifact org.apache.maven.plugins:maven-failsafe-plugin:pom:3.0.0-M7 fro
m/to central (https://repo.maven.apache.org/maven2): proxy authentication failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-failsafe-plugin/3.0.0-M7/maven-failsafe-plugin-3.0.0-M7.pom, status: 407 Proxy Authentication Required -> [Help 1]
[ERROR]
There is an additional commit with Quarkus 2.16.7.Final, where everything works like a charm:
commit 21c56b74959a892351ca8497fb41b57119ec27c1
Author: Christian Berger <chberger@users.noreply.github.com>
Date: Tue May 9 12:04:40 2023 +0200
feat: Working example with Quarkus 2.16.7.Final
Please don’t forget to delete the local
./repofolder in order to force remote artifact loading …
Output of uname -a or ver
No response
Output of java -version
17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.2.Final
Build tool (ie. output of mvnw --version or gradlew --version)
3.8.8
Additional information
Based on my observation the issue might be related to changes in Maven. Even with Quarkus 2.16.7.Final it fails when using Maven 3.9.X.
It seems like they changed the Maven resolver transport implementation from wagon to another impl, at least starting from Maven 3.9.X --> https://maven.apache.org/guides/mini/guide-resolver-transport.html
In addition to that, once you remove the BasicAuth config in tinyproxy.conf everything works even with Quarkus 3 and Maven 3.9.X. So it’s somehow related to the proxy config in combination with authentication …
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (16 by maintainers)
Commits related to this issue
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> — committed to aloubyansky/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> — committed to dmlloyd/quarkus by dmlloyd a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> (cherry picked from commit e3ce9e05f8b0440c611dbf44b78729c81c18dfbc) — committed to gsmet/quarkus by dmlloyd a year ago
- chore(deps): update all non-major dependencies to v3.1.2.final (mulk/quarkus-googlecloud-jsonlogging!16) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---... — committed to benkard/quarkus-googlecloud-jsonlogging by deleted user a year ago
- Use the container-provided settings decrypter Fixes #33220 Co-authored-by: Alexey Loubyansky <olubyans@redhat.com> — committed to sberyozkin/quarkus by dmlloyd a year ago
- Update quarkus.version to v3 (major) (mulk/mulkcms2!27) This MR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io.quarkus:quarkus-maven-plugin](https://git... — committed to benkard/mulkcms2 by benkard a year ago
What’s actually happened is that we discovered that we were doing a number of things wrong which resulted in this issue:
org.sonatype.plexusartifacts by mistake, causing class overlaps and other problemsThe current status is that it’s mostly working, however the quarkus extension create mojo is still having trouble - there’s probably still a missing exclusion or something which has to be figured out. We’re using the more recent and supported transport providers now, and in the PR branch I’ve also added an enforcer rule for the
org.sonatypeplexus coordinates so hopefully they won’t creep back in either. Still working on the last problems.I promise you I’ve learned nothing!
I’ve tested the following combinations:
As mentioned, in my reproducer u can use
mvnwwhich usesMaven 3.8.8…