You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Karagkiaouris Diamantis <di...@gmail.com> on 2016/05/07 19:49:49 UTC
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiple local repositories
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
On 5/7/16 10:08 PM, Karagkiaouris Diamantis wrote:
> Yes. Exactly but is it possible to pass a variable from
> <profile></profile> 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:
>>
>> <settings xmlns="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">
>> <localRepository>${user.home}/.m2/repository</localRepository>
>>
>> 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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiple local repositories
Posted by Karagkiaouris Diamantis <di...@gmail.com>.
Yes. Exactly but is it possible to pass a variable from
<profile></profile> 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:
>
> <settings xmlns="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">
> <localRepository>${user.home}/.m2/repository</localRepository>
>
> 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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Karagkiaouris G. Diamantis,
Junior Java EE Software Engineer,
www.eurodyn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiple local repositories
Posted by Karl Heinz Marbaise <kh...@gmx.de>.
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:
<settings xmlns="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">
<localRepository>${user.home}/.m2/repository</localRepository>
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Multiple local repositories
Posted by ec...@zusammenkunft.net.
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 <di...@gmail.com>
To: Maven Users List <us...@maven.apache.org>
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org