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.com 
wrote:
>
> 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

Reply via email to