You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mehdi Hayani <ha...@gmail.com> on 2015/06/04 10:30:55 UTC

Use of Multiple Local Repositories

Hello,

I'm actually working on a continuous integration platform, and most of the
projects are using Maven as a build tool.

We've found that there is a list of dependencies and plugins most of the
projects have to download in addition of there specific dependencies.
Therefore, I though it could be great if we can use multiple local reposiry
for a build, the idea is:

   - Local repo 1 : Is the shared folder where we will put dependencies
   that are download by each project.
   - Local repo 2 : this one is created for each project and it will
   contains dependencies that are specific to that project.


So while running the build, maven will check in "local repo 1", if it can't
find the required librairy it will download it and put it in "local repo 2"


It there a way to implement this solution :) ?

Thanks in advance

Re: Use of Multiple Local Repositories

Posted by Pascal Rapicault <pa...@rapicault.net>.
You can take a look at https://github.com/takari/tesla-split-localrepo
I remember seeing a demo of this, but I don't know if it is working with 
recent versions of Maven / Aether

HTH


On 06/04/2015 04:30 AM, Mehdi Hayani wrote:
> Hello,
>
> I'm actually working on a continuous integration platform, and most of the
> projects are using Maven as a build tool.
>
> We've found that there is a list of dependencies and plugins most of the
> projects have to download in addition of there specific dependencies.
> Therefore, I though it could be great if we can use multiple local reposiry
> for a build, the idea is:
>
>     - Local repo 1 : Is the shared folder where we will put dependencies
>     that are download by each project.
>     - Local repo 2 : this one is created for each project and it will
>     contains dependencies that are specific to that project.
>
>
> So while running the build, maven will check in "local repo 1", if it can't
> find the required librairy it will download it and put it in "local repo 2"
>
>
> It there a way to implement this solution :) ?
>
> Thanks in advance
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Use of Multiple Local Repositories

Posted by Mehdi Hayani <ha...@gmail.com>.
Thank u for your answer.

@Jeff, if we declare "local repo 1" as a remote Maven repo, During the
build, Maven will copy dependencies from "local repo 1" to "local repo
2", and one of the reasons of trying to set up two local repos at the same
time is to avoid dependencies duplication between projects and therefore
decrease disk space usage.

local repo 2 will contain only what is necessary for the project.

2015-06-04 11:44 GMT+02:00 Jeff MAURY <je...@jeffmaury.com>:

> Then declare local repo 1 as a remove Maven repo accessed from the file:
> URL prefix
>
> Jeff
>
> On Thu, Jun 4, 2015 at 11:41 AM, Curtis Rueden <ct...@wisc.edu> wrote:
>
> > Hi Mehdi,
> >
> > > it could be great if we can use multiple local reposiry for a build
> >
> > That has been discussed before on the list [1]. It was an interesting
> > discussion but ultimately Maven does not support such a feature. I think
> it
> > would be useful if a motivated party pursued it, though.
> >
> > Regards,
> > Curtis
> >
> > [1] *
> >
> http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E
> > <
> >
> http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E
> > >*
> >
> > On Thu, Jun 4, 2015 at 10:30 AM, Mehdi Hayani <hayani.mehdi149@gmail.com
> >
> > wrote:
> >
> > > Hello,
> > >
> > > I'm actually working on a continuous integration platform, and most of
> > the
> > > projects are using Maven as a build tool.
> > >
> > > We've found that there is a list of dependencies and plugins most of
> the
> > > projects have to download in addition of there specific dependencies.
> > > Therefore, I though it could be great if we can use multiple local
> > reposiry
> > > for a build, the idea is:
> > >
> > >    - Local repo 1 : Is the shared folder where we will put dependencies
> > >    that are download by each project.
> > >    - Local repo 2 : this one is created for each project and it will
> > >    contains dependencies that are specific to that project.
> > >
> > >
> > > So while running the build, maven will check in "local repo 1", if it
> > can't
> > > find the required librairy it will download it and put it in "local
> repo
> > 2"
> > >
> > >
> > > It there a way to implement this solution :) ?
> > >
> > > Thanks in advance
> > >
> >
>
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually
> working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
>

Re: Use of Multiple Local Repositories

Posted by Jeff MAURY <je...@jeffmaury.com>.
Then declare local repo 1 as a remove Maven repo accessed from the file:
URL prefix

Jeff

On Thu, Jun 4, 2015 at 11:41 AM, Curtis Rueden <ct...@wisc.edu> wrote:

> Hi Mehdi,
>
> > it could be great if we can use multiple local reposiry for a build
>
> That has been discussed before on the list [1]. It was an interesting
> discussion but ultimately Maven does not support such a feature. I think it
> would be useful if a motivated party pursued it, though.
>
> Regards,
> Curtis
>
> [1] *
> http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E
> <
> http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E
> >*
>
> On Thu, Jun 4, 2015 at 10:30 AM, Mehdi Hayani <ha...@gmail.com>
> wrote:
>
> > Hello,
> >
> > I'm actually working on a continuous integration platform, and most of
> the
> > projects are using Maven as a build tool.
> >
> > We've found that there is a list of dependencies and plugins most of the
> > projects have to download in addition of there specific dependencies.
> > Therefore, I though it could be great if we can use multiple local
> reposiry
> > for a build, the idea is:
> >
> >    - Local repo 1 : Is the shared folder where we will put dependencies
> >    that are download by each project.
> >    - Local repo 2 : this one is created for each project and it will
> >    contains dependencies that are specific to that project.
> >
> >
> > So while running the build, maven will check in "local repo 1", if it
> can't
> > find the required librairy it will download it and put it in "local repo
> 2"
> >
> >
> > It there a way to implement this solution :) ?
> >
> > Thanks in advance
> >
>



-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Re: Use of Multiple Local Repositories

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Mehdi,

> it could be great if we can use multiple local reposiry for a build

That has been discussed before on the list [1]. It was an interesting
discussion but ultimately Maven does not support such a feature. I think it
would be useful if a motivated party pursued it, though.

Regards,
Curtis

[1] *http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E
<http://mail-archives.apache.org/mod_mbox/maven-users/201310.mbox/%3C1617140979.4777131.1383039481273.JavaMail.root%40imag.fr%3E>*

On Thu, Jun 4, 2015 at 10:30 AM, Mehdi Hayani <ha...@gmail.com>
wrote:

> Hello,
>
> I'm actually working on a continuous integration platform, and most of the
> projects are using Maven as a build tool.
>
> We've found that there is a list of dependencies and plugins most of the
> projects have to download in addition of there specific dependencies.
> Therefore, I though it could be great if we can use multiple local reposiry
> for a build, the idea is:
>
>    - Local repo 1 : Is the shared folder where we will put dependencies
>    that are download by each project.
>    - Local repo 2 : this one is created for each project and it will
>    contains dependencies that are specific to that project.
>
>
> So while running the build, maven will check in "local repo 1", if it can't
> find the required librairy it will download it and put it in "local repo 2"
>
>
> It there a way to implement this solution :) ?
>
> Thanks in advance
>