I\'m aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like:
I haven't really used maven 2 before, our system is still working on maven 1.x because of some issues with maven 2.
However, looking at the documentation for maven 2 it seems that there aren't any specific System properties like that. However, you could probably build one into your poms/settings using the System properties. See System properties part of this http://maven.apache.org/settings.html
So you'd have ${maven.repository} in your settings file and then use the -Dmaven.repository like you do above.
I am unsure as to if this would work, but with some tweaking I am sure you can come up with something.