Skip to content

maven-public proxies Maven Central - documented or intended behavior? #13972

@A248

Description

@A248

Expected behavior

As far as I can tell, this repository did not used to proxy Maven Central. Perhaps this changed recently in relation to PaperMC's switch to JFrog Artifactory Israeli software. I don't know.

If this is intended, I would expect it to be documented. The repository is recommended for all starting plugin developers, and taking over Maven dependency resolution for central artifacts is surely unexpected behavior.

If it is not intended, well, you could save a lot of bandwith and resource usage by not proxying Maven Central. Some of my project's builds are failing with corrupted central artifacts, maybe because your repository is not handling the load, though I am unsure.

Observed/Actual behavior

The maven-public repository path proxies Maven Central. For example, take the following jar. It is resolved by the PaperMC repository instance, despite being an artifact located on Maven Central.

https://repo.papermc.io/repository/maven-public/org/slf4j/slf4j-api/1.2/slf4j-api-1.2.jar

I purposefully picked an older version of slf4j to demonstrate that all central artifacts are proxied, even though which don't have a useful relation to PaperMC.

Steps/models to reproduce

Visit a Maven-formatted central artifact URL through the maven-public PaperMC repository.

Plugin and Datapack List

N/A

Paper version

N/A

Other

I should note that maven-releases and maven-snapshots are not proxied. This makes sense. Also, they are more likely to return HTTP 302 redirects when resolving artifacts, and I think this happens because the artifacts are uncached.

In my testing, some artifacts resolve immediately with 200 status code:

While others generated 302's to artifactory URLs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionIssue represents a question and not a problem/request.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions