We have multiple Jenkins jobs using maven with the same userID with /home on a file system shared between slave nodes, so the default ~/.m2/repository led to ... nice speedups, but had the downside of doing The Wrong Thing, and causing errors. So for jobs that call mvn in the middle of a bash step (as opposed to using the local option others pointed out with a Maven step) you can do mvn ... -Dmvn.repo.local=/path/you/want
You can probably put that in your settings.xml file. On Sunday, April 26, 2015 at 3:12:56 AM UTC-7, Samith Dassanayake 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b41faf93-67fb-4f3a-8349-66d5550c96f9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.