We have maven builds that use plugin “maven-antrun-plugin-1.8”. When the maven-antrun-pluglin task is executed it first checks the external apache snapshot repository " repository.apache.org/snapshots]" for internal artifacts then checks our internal nexus3 repository “repository.company.com” for the same internal artifact.
Problem occurs when the external apache repository is not available the build times out with status code “503”.
Is it possible to configure nexus to stop attempting to download internal artifacts from an external repository?
This is exactly the case why we built Routing Rules.
Alternatively, you can re-order repositories in your group repository, but that wouldn’t prevent to send requests to Apache repository if your internal repository wouldn’t have an artifact you ask for, it would just ask your internal repository first.
Thanks you for the quick response. I was unable to find “Routing Rules” section under Repository. I have nx-all previlege. We’re on OSS 3.15.2-01. Under Repository, I see:
Blob Stores
Repositories
Content Selectors
Cleanup Policies
I believe I found the needed solution in the Nexus documents under “Configuring Apache Maven”. Once I added the mirrorOf belo to our settings.xml, ALL artifact request went through our Nexus Repository Manager.