sometimes my remote repositories are not accessible, so I would like to know if there's a Maven command line option to prevent download from a list of remote repositories by names, without modifying my settings.xml or pom.xml
I'm looking for something like: mvn clean install --exclude-remote-repositories=foo-repository,bar-repository
Notes:
--offlineis too much, since it prevents me to access the central repository- I don't want to change my
settings.xmlorpom.xml
The real solution is what khmarbaise suggested: Install a Nexus or Artifactory and use it to cache the remote repositories.