You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "kwin (via GitHub)" <gi...@apache.org> on 2026/04/20 13:03:41 UTC
[I] Expose response body digest for unexpected status codes [maven-resolver]
kwin opened a new issue, #1844:
URL: https://github.com/apache/maven-resolver/issues/1844
### New feature, improvement proposal
Codes like a 403 usually don't say much without having access to the response body.
Central seems to use this to indicate blocking of certain client IPs (https://the-asf.slack.com/archives/C7Q9JB404/p1776682107010189). In order to ease debugging issues like this the response body should be exposed (at least partially) in the exception.
Example stack trace:
```
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact eu.maveniverse.maven.mimir:extension3:pom:0.11.3 from/to central (https://repo.maven.apache.org/maven2): HTTP Status: 403
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:44)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:467)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:290)
at org.eclipse.aether.internal.impl.filter.FilteringRepositoryConnector.get(FilteringRepositoryConnector.java:95)
at org.eclipse.aether.internal.impl.offline.OfflineRepositoryConnector.get(OfflineRepositoryConnector.java:82)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:400)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:201)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:180)
at org.apache.maven.impl.resolver.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:173)
at org.apache.maven.impl.resolver.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:121)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:206)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveCoreExtension(DefaultPluginDependenciesResolver.java:173)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.resolveExtension(BootstrapCoreExtensionManager.java:230)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.resolveCoreExtensions(BootstrapCoreExtensionManager.java:167)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.loadCoreExtensions(BootstrapCoreExtensionManager.java:150)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.loadCoreExtensions(PlexusContainerCapsuleFactory.java:304)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.container(PlexusContainerCapsuleFactory.java:90)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.createContainerCapsule(PlexusContainerCapsuleFactory.java:81)
at org.apache.maven.cling.invoker.LookupInvoker.container(LookupInvoker.java:517)
at org.apache.maven.cling.invoker.LookupInvoker.doInvoke(LookupInvoker.java:158)
at org.apache.maven.cling.invoker.LookupInvoker.invoke(LookupInvoker.java:134)
at org.apache.maven.cling.ClingSupport.run(ClingSupport.java:76)
at org.apache.maven.cling.MavenCling.main(MavenCling.java:51)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke(Method.java:565)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: org.eclipse.aether.spi.connector.transport.http.HttpTransporterException: HTTP Status: 403
at org.eclipse.aether.transport.jdk.JdkTransporter.lambda$implGet$0(JdkTransporter.java:301)
at org.eclipse.aether.spi.connector.transport.http.RFC9457.RFC9457Reporter.generateException(RFC9457Reporter.java:75)
at org.eclipse.aether.transport.jdk.JdkTransporter.implGet(JdkTransporter.java:300)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:64)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:533)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:464)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:290)
at org.eclipse.aether.internal.impl.filter.FilteringRepositoryConnector.get(FilteringRepositoryConnector.java:95)
at org.eclipse.aether.internal.impl.offline.OfflineRepositoryConnector.get(OfflineRepositoryConnector.java:82)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:400)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:201)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:180)
at org.apache.maven.impl.resolver.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:173)
at org.apache.maven.impl.resolver.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:121)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:206)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveCoreExtension(DefaultPluginDependenciesResolver.java:173)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.resolveExtension(BootstrapCoreExtensionManager.java:230)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.resolveCoreExtensions(BootstrapCoreExtensionManager.java:167)
at org.apache.maven.cling.extensions.BootstrapCoreExtensionManager.loadCoreExtensions(BootstrapCoreExtensionManager.java:150)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.loadCoreExtensions(PlexusContainerCapsuleFactory.java:304)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.container(PlexusContainerCapsuleFactory.java:90)
at org.apache.maven.cling.invoker.PlexusContainerCapsuleFactory.createContainerCapsule(PlexusContainerCapsuleFactory.java:81)
at org.apache.maven.cling.invoker.LookupInvoker.container(LookupInvoker.java:517)
at org.apache.maven.cling.invoker.LookupInvoker.doInvoke(LookupInvoker.java:158)
at org.apache.maven.cling.invoker.LookupInvoker.invoke(LookupInvoker.java:134)
at org.apache.maven.cling.ClingSupport.run(ClingSupport.java:76)
at org.apache.maven.cling.MavenCling.main(MavenCling.java:51)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke(Method.java:565)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Expose response body digest for unexpected status codes [maven-resolver]
Posted by "jiteshkhatri11 (via GitHub)" <gi...@apache.org>.
jiteshkhatri11 commented on issue #1844:
URL: https://github.com/apache/maven-resolver/issues/1844#issuecomment-4702310755
I would be interested in working on this enhancement. My understanding is that the current `RFC9457Reporter` only helps when repositories implement RFC 9457, while many repositories return useful diagnostic information as plain text or HTML bodies. Introducing a transport-agnostic reporter abstraction with a fallback implementation that captures a bounded response preview or digest seems reasonable. I will investigate the existing exception flow around `JdkTransporter.implGet()` and propose an implementation approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Expose response body digest for unexpected status codes [maven-resolver]
Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on issue #1844:
URL: https://github.com/apache/maven-resolver/issues/1844#issuecomment-4938470327
As always exposing the response body for error response directly within the exception might lead to unreadable logs I would propose to rather log the body on DEBUG level.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Expose response body digest for unexpected status codes [maven-resolver]
Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on issue #1844:
URL: https://github.com/apache/maven-resolver/issues/1844#issuecomment-4280994173
Seems the https://github.com/apache/maven-resolver/blob/master/maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/transport/http/RFC9457/RFC9457Reporter.java is not enough as most Maven Repos don't implement RFC 9457. Therefore some fallback on the response body should be implemented. Probably this requires introducing a RFC 9457 agnostic reporter interface. @cstamas WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org