Reduce public Maven repository lookups

Description

Looks like there are lots of queries for third-party artifacts to our public Nexus repository.

Environment

None

is related to

Activity

Tom ZellerOctober 14, 2021 at 10:05 PM

Actually, no, looks like it is not possible to reduce repository lookups.

Each <repository> (under <repositories> in the POM) are tried in order.

Looks like there is no way to map artifacts (either by artifactId or groupId) to a repo.

I guess if I had a Maven wish-to-come-true, it would be something like this :

 

to map artifacts to a repo and key.

So it’s either all or nothing.

We could make the 3rd Party Nexus repo private instead of public, but either Nexus or Apache would still need to return 404s for artifacts besides ours, so that does not reduce lookups.

Kinda have to deploy to Maven Central unless we want to “pay” for the network traffic.

Tom ZellerOctober 13, 2021 at 5:35 PM

Nexus has the ability to route artifact requests to specific repositories, but their own doc says to use sparingly :

Tom ZellerOctober 13, 2021 at 5:03 PM

Probably should consider restricting the 3rd Party repository to “us” rather than “anyone”.

This issue was one of the complaints from users of Maven Central.

Tom ZellerOctober 13, 2021 at 5:00 PM
Edited

The Nexus public repository is a group repository consisting of the releases, snapshots, and 3rd Party repositories.

The parent POM uses the public repository when really it should use releases.

So the following :

should be changed to :

Similar for plugin repository, should be changed from :

to same as the non-plugin repository, we need both thirdparty and releases (for our plugins).

Won't Do

Details

Assignee

Reporter

Created October 13, 2021 at 4:56 PM
Updated October 14, 2021 at 10:05 PM
Resolved October 14, 2021 at 10:05 PM