PaperMC / PaperMC/Paper

MavenLibraryResolver doesn't log errors

Open
#12,638 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted version: 1.21.4
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Failed requests/downloads made by the MavenLibraryResolver should be logged.

Observed/Actual behavior

Failed requests/downloads made by the MavenLibraryResolver aren't logged.

Steps/models to reproduce
  • Setup Paper server
  • Ensure the libraries folder doesn't exist
  • Install a plugin that makes use of the library loading feature. Eg: veinminer-paper-2.4.4.jar
  • Make the downloads somehow fail. Eg. redirect maven central domain: echo "8.8.8.8 repo.maven.apache.org" | sudo tee -a /etc/hosts
  • Start the server

You'll see a lot of messages like

[19:34:46 INFO]: [MavenLibraryResolver] Downloading https://repo.maven.apache.org...

But you won't see that they fail.

Plugin and Datapack List
> plugins
[19:41:14 INFO]: ℹ Server Plugins (1):
[19:41:14 INFO]: Paper Plugins:
[19:41:14 INFO]:  - Veinminer
Paper version
[19:25:33 INFO]: 
This server is running Paper version 1.21.4-231-ver/1.21.4@09e9afd (2025-05-19T17:59:36Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Other

We're a large-scale hoster and running into issues downloading artifacts from Maven Central due to their rate-limiting: https://www.sonatype.com/blog/maven-central-and-the-tragedy-of-the-commons

We initially discovered our IPs being rate-limited at another end, but ended up wondering why we don't see issues in Paper.

Not too sure about this, but it looks like Paper doesn't try to download a specific library from a specific repository. It just tries to download the required libraries from any of the provided repositories.
This may result in a lot of error messages. So, maybe just log 5XX and/or 429 responses only.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names MavenLibraryResolver as the entry point; start there and reproduce the failed Maven download using the hosts-file setup described. Trace how failed requests are handled and verify that the relevant failures are logged without changing the resolver's repository behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.