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

Reply via email to