You can configure the repositories in settings.xml file of Apaache Maven
Create a new settings.xml file in your project root folder or you can also modify your global maven configuration by updating the settings.xml file in {ApacheMaven}/conf/settings.xml file
By default, Maven will look for the libraries in the order in which they are specified.
Giving below an example configuration for one internal repo with the backup repo as the maven public repo.
nexus Nexus Repository http://your-nexus-server/repository/maven-public/ true true central * https://repo1.maven.org/maven2/