Reputation: 2058
I have an internal maven repo that I want all traffic to go through while I am on the corp network, but when I am not on the network, I would like to use public repos whenever possible. Is there any way for me to do this in settings.xml with mirrors? I would like to have the internal repo "mirror" external ones, but when it is not reachable to fall back to the external ones.
I would like to avoid using profiles unless they can auto-detect and fall back. I rather not use special flags to enable/disable internal use.
Upvotes: 1
Views: 1360
Reputation: 3156
If you have "some" control over the repo, you could configure a "repository" of your corporate repo to be a proxy of the public repos. (I use Nexus, but it dhould not be very different in artifactory).
Then you put the corporate repo and the public repos in your repository list, in the right order (corporate first, public next).
Upvotes: 1