-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-Repository Endpoints #2
Comments
What would you suggest for established artifacts which contain a Would there be some other replacement syntax where an underscore |
If you're referring to the top group directory that includes a - such as https://repo1.maven.org/maven2/ant-contrib/
And then the requests would be translated as follows: Nothing on maven central has a top level folder ending in |
With the inclusion of a "whitelist" of repo names, then this system seems fine to me. |
There is a concern for mirroring things, say we have a repo named |
The further facilitate better administration I am working on re-designing how repositories are defined.
The idea is that I can setup repositories for our parnters, and have their data isolated from ours in the backend.
But served to the public as one cohesive repository.
To my understanding, Sonatype has the following design:
The public is a merged view of snapshot and releases. Down to directory listings, and maven metadatas.
I propose that we follow the same design, where we disallow
-
in repository names, and use that to specify the view type.But instead of having a 'public' view, we simply treat requests for the repo without a
-
as the 'merged' repo.For example, we have two files in the 'forge' repository:
If there is a request for
/forge/net/minecraftforge/fg/
it would list both sub-folders.But if there is a request for
/forge-snapshots/net/minecraftforge/fg/
it would only list the one snapshot version.To this end, I also propose we special case the root names
releases
andsnapshots
. So that no repository may have that name.If we do encounter one of those names, we should treat it as if requesting that view of all available repos.
This way consumers can have one endpoint for the maven repository without having to know what we do in the backend.
For example:
Requesting
/releases/
would list bothnet
andorg
, and be able to serve direct requests for the1.0
artifacts for both groups.Requesting
/snapshots/
would be the same, but serve the1.0-SNAPSHOT
artifacts.Requesting
/
would serve all 4 artifacts.For publishing, there are two options. Either we can support publishing to the root repo
forge
which then would attempt to extract the artifact version via the folder structure and place it in the correct sub-repo. Or we do not allow publishing to the merged repos and rely on those uploading to specify the correct repo.Personally, I like the idea of being able to publish to the root and have the backend hidden. However that imposes quite complex operations on the servers end. As we would need to attempt to find the 'version' of the file being published, and then pick the correct sub-repo. So the first pass should probably require publishing to an explicitly defined repo.
At the very least i'd love to be able to support publishing to
/releases/
and/snapshots/
and having it auto pick the correct top level repo based on path prefixes.The text was updated successfully, but these errors were encountered: