Multiple local repositories

2016-05-07 Thread Karagkiaouris Diamantis

Hello,

I would like to ask if it is possible to have multiple local maven 
repositories and if it can be set as a parameter in a maven profile.


Thank you
--

Karagkiaouris G. Diamantis,

Junior Java EE Software Engineer,

www.eurodyn.com


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



Multiple Local Repositories

2012-11-01 Thread iamanandkris
Hi 

Can we have more than one local maven repositories in a computer? So that I
can use one repo for on of my projects and other for other projects?

If so can some one pls give some guide lines on how to facilitate that?

Thank you
Anand



--
View this message in context: 
http://maven.40175.n5.nabble.com/Multiple-Local-Repositories-tp5729020.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Multiple local repositories

2016-05-07 Thread Karl Heinz Marbaise

Hi,

On 5/7/16 9:49 PM, Karagkiaouris Diamantis wrote:

Hello,

I would like to ask if it is possible to have multiple local maven
repositories and if it can be set as a parameter in a maven profile.


Can you explain what you exactly mean.

Do you mean having a different local caches for different purposes ?

Runinng one build with cache at $HOME/.m2/repository and running a 
second build with cache at $HOME/.m2/repository-run-two


The location of the local cache can be configured via the 
[settings.xml][1] file like this:


http://maven.apache.org/SETTINGS/1.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
  https://maven.apache.org/xsd/settings-1.0.0.xsd";>
  ${user.home}/.m2/repository

This snippet above shows the default...to change it for your own 
purposes you need to change localRepositoy entry...


But usually i can't recommend that, only if you exactyl what you are 
doing...




[1]: https://maven.apache.org/settings.html

Kind regards
Karl Heinz Marbaise

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



Re: Multiple local repositories

2016-05-07 Thread ecki
Hello,

 you can configure local repositories with file: URLs configured in profiles.

https://maven.apache.org/guides/mini/guide-multiple-repositories.html

It is not possible to have the local repository cache in a profile, but you can 
use different settings.xml files with the -s option.

https://maven.apache.org/ref/3.3.9/maven-settings/settings.html

I typically use this to have an opensource/public- and company setting- with 
different mirrors, servers, repositories and a clean repository cache.

Gruss
Bernd

-- 
http://bernd.eckenfels.net

-Original Message-
From: Karagkiaouris Diamantis 
To: Maven Users List 
Sent: Sa., 07 Mai 2016 21:50
Subject: Multiple local repositories

Hello,

I would like to ask if it is possible to have multiple local maven 
repositories and if it can be set as a parameter in a maven profile.

Thank you
-- 

Karagkiaouris G. Diamantis,

Junior Java EE Software Engineer,

www.eurodyn.com


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


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



Re: Multiple local repositories

2016-05-07 Thread Karagkiaouris Diamantis
Yes. Exactly but is it possible to pass a variable from 
 tag during the build in order to have different 
local caches?


Thank you

Am 07.05.2016 um 22:57 schrieb Karl Heinz Marbaise:

Hi,

On 5/7/16 9:49 PM, Karagkiaouris Diamantis wrote:

Hello,

I would like to ask if it is possible to have multiple local maven
repositories and if it can be set as a parameter in a maven profile.


Can you explain what you exactly mean.

Do you mean having a different local caches for different purposes ?

Runinng one build with cache at $HOME/.m2/repository and running a 
second build with cache at $HOME/.m2/repository-run-two


The location of the local cache can be configured via the 
[settings.xml][1] file like this:


http://maven.apache.org/SETTINGS/1.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd";>
${user.home}/.m2/repository

This snippet above shows the default...to change it for your own 
purposes you need to change localRepositoy entry...


But usually i can't recommend that, only if you exactyl what you are 
doing...




[1]: https://maven.apache.org/settings.html

Kind regards
Karl Heinz Marbaise

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



--

Karagkiaouris G. Diamantis,

Junior Java EE Software Engineer,

www.eurodyn.com


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



Re: Multiple local repositories

2016-05-07 Thread Karl Heinz Marbaise

On 5/7/16 10:08 PM, Karagkiaouris Diamantis wrote:

Yes. Exactly but is it possible to pass a variable from
 tag during the build in order to have different
local caches?


No..the localRepository can not be part of a profile.


But you can use the following:


mvn -Dmaven.repo.local=$HOME/.my/other/repository


Kind regards
Karl Heinz Marbaise


Thank you

Am 07.05.2016 um 22:57 schrieb Karl Heinz Marbaise:

Hi,

On 5/7/16 9:49 PM, Karagkiaouris Diamantis wrote:

Hello,

I would like to ask if it is possible to have multiple local maven
repositories and if it can be set as a parameter in a maven profile.


Can you explain what you exactly mean.

Do you mean having a different local caches for different purposes ?

Runinng one build with cache at $HOME/.m2/repository and running a
second build with cache at $HOME/.m2/repository-run-two

The location of the local cache can be configured via the
[settings.xml][1] file like this:

http://maven.apache.org/SETTINGS/1.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd";>
${user.home}/.m2/repository

This snippet above shows the default...to change it for your own
purposes you need to change localRepositoy entry...

But usually i can't recommend that, only if you exactyl what you are
doing...



[1]: https://maven.apache.org/settings.html



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



Re: Multiple Local Repositories

2012-11-01 Thread Richard Vowles
Use a different settings file. and configure the right dir in each one:

http://jan.baresovi.cz/dr/en/maven-command-line
and
http://maven.apache.org/settings.html


On Fri, Nov 2, 2012 at 2:14 AM, iamanandkris  wrote:

> Hi
>
> Can we have more than one local maven repositories in a computer? So that I
> can use one repo for on of my projects and other for other projects?
>
> If so can some one pls give some guide lines on how to facilitate that?
>
> Thank you
> Anand
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Multiple-Local-Repositories-tp5729020.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
---
Richard Vowles,
Grails, Groovy, Java, Javascript, AngularJS
Consistency is the last refuge of the unimaginative - Oscar Wilde
ph: +64275467747, google+:http://rvowl.es/UX8Bmq
podcast: http://www.illegalargument.com


Re: Multiple Local Repositories

2012-11-01 Thread Ansgar Konermann
During "normal" use of maven, one repository should be shared between your
projects.

Why do you feel the need to have separate repositories for each of your
projects?
Am 02.11.2012 02:26 schrieb "iamanandkris" :

> Hi
>
> Can we have more than one local maven repositories in a computer? So that I
> can use one repo for on of my projects and other for other projects?
>
> If so can some one pls give some guide lines on how to facilitate that?
>
> Thank you
> Anand
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Multiple-Local-Repositories-tp5729020.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Multiple Local Repositories

2012-11-01 Thread hanasaki
Generally good to just have one local repo per user.  This defaults to
~/.m2/repository

Based on the pom.xml all the needed dependencies will be pulled from the
remote repos automatically so : no worries.

If you really want more than one local repo for the same user id, take a
look at settings.xml:
http://maven.apache.org/run-maven/index.html#Quick_Start
http://maven.apache.org/guides/mini/guide-configuring-maven.html

In continuous integration - it may be good to have one local repository
per project and a script that deletes the local repository before a
nightly build is performed; else if someone changes the coordinates of a
project, cruft can result in build issues that are hard to track down.

-

 Original Message 
Subject: Multiple Local Repositories
From: iamanandkris
To: users@maven.apache.org
Date: 11/01/2012 08:14 AM

> Hi 
> 
> Can we have more than one local maven repositories in a computer? So that I
> can use one repo for on of my projects and other for other projects?
> 
> If so can some one pls give some guide lines on how to facilitate that?
> 
> Thank you
> Anand
> 
> 
> 
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Multiple-Local-Repositories-tp5729020.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

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



Use of Multiple Local Repositories

2015-06-04 Thread Mehdi Hayani
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

2015-06-04 Thread Curtis Rueden
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
*

On Thu, Jun 4, 2015 at 10: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
>


Re: Use of Multiple Local Repositories

2015-06-04 Thread Jeff MAURY
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  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 
> 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

2015-06-04 Thread Mehdi Hayani
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 :

> 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  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  >
> > 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

2015-06-04 Thread Pascal Rapicault

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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org