Maven repository settings in settings.xml take precedence over explicitly specifying the repository in uploadArchives task which seems wrong. I may not even be aware that there is maven installation on the build machine which is overriding my desires that have been stated in my build.gradle.