Does remote repository filtering fit your usecase? https://maven.apache.org/resolver/remote-repository-filtering.html
// Mantas On Wed, Feb 11, 2026, 15:27 Yeikel Santana <[email protected]> wrote: > Currently, Maven resolves artifacts from repositories in order and does > not allow specifying a repository per dependency. > > > In scenarios where the same artifact coordinates may exist in multiple > repositories, there does not appear to be a built-in way to enforce that a > specific dependency be resolved only from a specific repository. > > > Has per-dependency repository resolution ever been discussed or considered > in Maven’s design? Not as a default but as a feature that could be enabled > > > The goal would be to enforce that certain artifacts (for example, internal > coordinates) must only be resolved from a designated repository, and that > the build should fail if they are resolved from any other repository even > if the artifact exists in multiple registries. > > > In Gradle, in case it matters, this is done via "includeGroup" [1] > > > > https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.artifacts.repositories/-inclusive-repository-content-descriptor/include-group.html > > > Thanks
