Dear Sebastian, I solved this issue doing this because i think that versioning for configurations is the big issue in Jenkins:
1) put your settings file in the scm you're using (in my case svn). 2) create a Jenkins job and allow only jenkins administrator to see it (i use matrix project configuration) and configure the polling interval into the job. Now you'll have the configuration files (versioned) stored into the $JENKINS_HOME/jobs/job_name/workspace/path_to_your_file.xml 3) create jenkins global variable environments and assign them the path of your cfg files using the jenkins configuration 4) pass to the job you're configuring the environment variable containing the path of the file you need. Hope this can help you. Federico 2012/4/26 Maven User <maven.2.u...@gmail.com> > There's a config-file-provider plugin that does what you're looking for: > > https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin > > Seems like a horrible idea to put a settings file in a source tree > though.... > > There's really no way to use properties like env.<computername> or w/e and > leverage the resources plugin to manipulate things? > > And Stephen is right - don't use MAVEN_OPTS, just the -D options.... > > > On Thursday, April 26, 2012 4:33:47 AM UTC-4, sebasti...@softwareag.comwrote: >> >> Hi, >> >> >> I wonder how to best use Maven profiles on Jenkins. Our profile is >> stored in a settings.xml file, which is contained in our source tree. >> We can include this profile in Jenkins using -s path/to/settings.xml >> option. >> >> Usually, a developer would need to alter this file and adapt it to his >> working machine like including correct local hostname in some >> properties. How do I do that on Jenkins? I know I can ssh to the >> machine and make a local change, but that's probably not the best >> approach. >> >> Another approach could be to define specific values using the >> MAVEN_OPTS edit box on job configuration. Is that the preferred >> approach to be taken? >> >> I would be glad if people could share their experience! >> >> >> Thanks, >> >> Sebastian > >