0

I'm working with Jenkins & Maven I'm looking for a way that would also me not to download commonly used artifacts like org.apache, org.springframework... but will allow me to redownload/rebuild only my own company artifacts. I am aware of the following options -

  1. running jobs with their own local maven repository, but that will download replicate the common components many many times.
  2. deleting/purging the com.myCompany package from the machine repository - but that would have 'slave machine' wide effects on other builds running in parallel.

My idea is to use a job maven repository but have softlinks to the machine .m2 repository for all the artifacts packages except com.myCompany, it seems that this would be a fair solution. Basically giving me the option perform directory "overloading" for com.myCompany directory

Does anybody know of any other solution for this problem or have implemented such a scheme?

roiros
  • 96
  • 6

1 Answers1

0

If you use a binary repository like Artifactory, you can create remote repositories to host your commons artifacts. Next, you can configure the Includes Pattern to filter your commons versions. Your build will stop downloading them if your local version (.m2) is the same than the remote repository version.

Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38
  • I wish to solve it locally without requiring an additional artifact repository aside from my company main one – roiros Mar 22 '15 at 15:43