We run our Jenkins nodes with a service account that has a a network-mounted home directory. I don't want to rely on that account's ~/.m2/settings.xml (beacuse people can and do periodically mess it up), so we have deployed a templated copy into Artifactory. Downloading that file populates the encrypted password and some other site-specific settings. So I'm looking for a way to have all my Maven build nodes get the settings.xml from Artifactory so that our Maven jobs can have a standardized custom path to set.
As I understand it, I can't have a matrix job that runs on all nodes with a given label, it will just pick one node with that label instead. I can have a job that runs on the server to pull the file from Artifactory into $JENKINS_HOME/userContent, and then use the Copy to Slave plugin, and set the Maven build options to use ${WORKSPACE}/settings.xml. Anybody have any caveats from prior experience with that method? Is there a better alternative?