I'm afraid I can't provide an example. I was only guessing that it is possible, but don't have experience to prove it is possible.
When I read https://maven.apache.org/guides/mini/guide-configuring-maven.html , it seems to indicate that the settings.xml file can specify the location of the local repository directory. It seems that if you can use the settings file to specify a job specific repository directory, you would probably also be able to use the settings file to have a subset of your jobs use a specific repository directory. Mark Waite On Sun, Apr 26, 2015 at 11:41 AM Samith Dassanayake <[email protected]> wrote: > Hi Mark, > I didn't get your point.. Could you please elaborate more. It would be > great-full, if you could provide an example. > > Thanks, > Samith > > > On Sunday, April 26, 2015 at 10:36:49 PM UTC+5:30, Mark Waite wrote: > >> Can the repository in use by a job be set from the settings.xml file? If >> so, then you might use a "managed file" which contains the definition of >> the repository you want for a specific job. >> >> The managed file is then assigned to the job through that same Advanced >> settings dialog. >> >> Mark Waite >> >> On Sun, Apr 26, 2015 at 7:12 AM Samith Dassanayake <[email protected]> >> wrote: >> > Hi Mark, >>> Yes. By setting "Use private Maven repository" option we can configure >>> whether to use a private maven repository, But the possible values are >>> default, local-to-workspace and local-to-executor. Therefore I cannot >>> specify the local maven repository to use. >>> What I want to do is each job will have their own workspace and set of >>> jobs will share a single local maven repo >>> >>> Example >>> *JOB* *WORKSPACE* *LOCAL MAVEN REPO* >>> job1 JENKINS_HOME/job1 /home/jenkins/*local_repo_1* >>> job2 JENKINS_HOME/job2 /home/jenkins/*local_repo_1* >>> job3 JENKINS_HOME/job3 /home/jenkins/*local_repo_1* >>> >>> job4 JENKINS_HOME/job4 /home/jenkins/*local_repo_2* >>> job5 JENKINS_HOME/job5 /home/jenkins/*local_repo_2* >>> >>> Here job1,job2 and job3 will have their own workspace but share the >>> local maven repository in " /home/jenkins/*local_repo_1*". But for job4 >>> and job5 maven repository will be " /home/jenkins/*local_repo_2*". How >>> can I configure jenkins to achieve that? >>> >>> Thanks, >>> Samith >>> >>> On Sunday, April 26, 2015 at 4:21:30 PM UTC+5:30, Mark Waite wrote: >>> >>>> The maven build step includes an advanced button which allows you to >>>> configure the repository for that job. >>>> >>>> Mark Waite >>>> >>>> On Sun, Apr 26, 2015, 4:13 AM Samith Dassanayake <[email protected]> >>>> wrote: >>>> >>> Hi all, >>>>> I want to set a local maven repository per set of jobs >>>>> dynamically.(kind of a job partitioning method) For an example >>>>> job1, job2, job3 --> use /home/jenkins/dir1 >>>>> job4, job5, --> use /home/jenkins/dir2 >>>>> job7 --> use /home/jenkins/dir3 >>>>> etc.. >>>>> >>>>> Is there a way to define local maven repository location in the >>>>> config.xml such that I can define which local maven repository to use, >>>>> during the job creation per particular job? >>>>> >>>>> Thanks, >>>>> Samith >>>>> >>>>> -- >>>>> 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 [email protected]. >>>> >>>> >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/jenkinsci-users/38b4d42b-298b-41cd-bfc2-f28a2b8c32c3%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/jenkinsci-users/38b4d42b-298b-41cd-bfc2-f28a2b8c32c3%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> 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 [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/67b464fb-c5fc-4f2c-a28c-5fd3726cab0b%40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/67b464fb-c5fc-4f2c-a28c-5fd3726cab0b%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/913cca4d-5f9f-4e68-9ea5-8dc4d196d0f1%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/913cca4d-5f9f-4e68-9ea5-8dc4d196d0f1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG1kEyfAOcYmRSDHLcx6SH0uO_tHtseaqVhs2qVaijxbQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
