I have the following in .m2, disabling the default remote repo:
my.mirror
My Mirror
https://repo.maven.apache.org/alwaysfail
*
Now I added this in my project pom.xml
myproject.repo
https://repo.maven.apache.org/maven2
But it does not pick up my project specific remote repo and start downloading, what am I doing wrong?
解决方案
setting.xml allows you to override definitions in pom.xml, not the other way round. If you want to not use the overriding in settings.xml in a particular build, you could prepare another settings file and call it explicitly:
$ mvn install -s /path/to/no-repo-override.xml