How to dynamically set the local maven repo for a jenkins job

45 views
Skip to first unread message

Samith Dassanayake

unread,
Apr 22, 2015, 2:45:26 PM4/22/15
to jenkins...@googlegroups.com
Hi all,

I'm trying to create a jenkins job using the Jenkins remote access API[1]. What I want to achieve is, I want to specify the local maven repository for the job, using the job configuration(config.xml) which I send to the create job API. How can I achieve that? What are xml attributes that I should have added(or changed)?

Please advice


Thanks,
Samith

Mark Waite

unread,
Apr 22, 2015, 3:16:02 PM4/22/15
to jenkins...@googlegroups.com
Can you define a job (using the web interface, interactively) and then copy the resulting config.xml as your starting point?

I've stored copies of config.xml so that I can watch the evolution of the job definition over time, and it has worked quite well.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f00039d5-6705-4edb-ae44-99e933564117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samith Dassanayake

unread,
Apr 22, 2015, 10:27:58 PM4/22/15
to jenkins...@googlegroups.com
Hi Mark,

The problem is I want to define manually a local maven repository folder instead of the defined in the global, per a job. To do that what are the plugins that I have to install and what are the configurations that I should change?

Thanks,
Samith

Mark Waite

unread,
Apr 23, 2015, 12:55:45 AM4/23/15
to jenkins...@googlegroups.com
The maven build step that is available with a freestyle project includes an Advanced button.  I believe that Advanced panel includes options which will allow you to specify a maven repository per job.

Reply all
Reply to author
Forward
0 new messages