Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Francois Marot
Hello all, I would like clarifications on MNG-2802[*] that seems to be solved. If I understand correctly it solves the problem where multiple simultaneous Maven executions shared the same local repository. I have been keeping for years a bit of code in my Jenkinsfiles ensuring the local repos

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Thomas Broyer
>From JIRA links, this is apparently fixed by https://issues.apache.org/jira/browse/MRESOLVER-131, which means you need to deploy a Redis server. There apparently also is an Hazelcast-based version: https://maven.apache.org/resolver/maven-resolver-named-locks/index.html On Mon, Oct 4, 2021 at

Re: Global pre-installation of Maven extensions w/out ~/.m2/lib/ext

2021-10-04 Thread Austin Witt
Is it broken in that it doesn't actually solve the problem? Or broken in that it doesn't actually install correctly in Maven? Regardless, is there a solution you would recommend for solving the "many concurrent instances of Maven are running against the same local repository, and sometimes their

[ANN] Apache Maven 3.8.3 released

2021-10-04 Thread Michael Osipov
The Apache Maven team is pleased to announce the release of the Apache Maven 3.8.3 Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece

Re: Global pre-installation of Maven extensions w/out ~/.m2/lib/ext

2021-10-04 Thread Tamás Cservenák
There is an ongoing thread on users ML about same issue here: https://lists.apache.org/thread.html/rd30b06bbe69de2466fd49bc665b96f02dfb8c34431cedff678fe1a08%40%3Cusers.maven.apache.org%3E HTH T On Mon, Oct 4, 2021 at 5:28 PM Austin Witt wrote: > Is it broken in that it doesn't actually solve

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Francois Marot
Wooohaa, thanks Thomas. It's a whole new world being revealed to me: I wasn't aware of the huge work happening on artifact resolvers. At the same time, it seems not to be available out of the box (needs a Redis server) so I'll keep my Jenkinsfile hacks for now and will wait for proper

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Oliver Fischer
Yes, these are good news! Am 04.10.21 um 15:10 schrieb Thomas Broyer: From JIRA links, this is apparently fixed by https://issues.apache.org/jira/browse/MRESOLVER-131, which means you need to deploy a Redis server. There apparently also is an Hazelcast-based version:

Re: Global pre-installation of Maven extensions w/out ~/.m2/lib/ext

2021-10-04 Thread Bernd Eckenfels
An easy fix is to run maven with one local Repo cache per executor thread. Jenkins has a option for that. Alternatively run the whole build in a container with Repo overlay. (I wish Jenkins had more support to prepopulate those) Gruss Bernd -- http://bernd.eckenfels.net

Re: Global pre-installation of Maven extensions w/out ~/.m2/lib/ext

2021-10-04 Thread Michael Osipov
Am 2021-10-04 um 17:27 schrieb Austin Witt: Is it broken in that it doesn't actually solve the problem? Or broken in that it doesn't actually install correctly in Maven? It does not solve the problem. It fails miserably. Don't use it. See here also:

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Michael Osipov
Am 2021-10-04 um 22:13 schrieb Francois Marot: "Salut" Michael, thanks for the detailled answer. Regarding my Jenkins 'hack' you can totally forget about it: it just ensures no more than one Maven execution uses a given repo at once by locating the local repositories in a folder reflecting the

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Michael Osipov
Am 2021-10-04 um 14:31 schrieb Francois Marot: Hello all, I would like clarifications on MNG-2802[*] that seems to be solved. If I understand correctly it solves the problem where multiple simultaneous Maven executions shared the same local repository. I have been keeping for years a bit of

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Bernd Eckenfels
What’s the problem with adivisory locking, as long as Maven honors the advice it is the same as it’s a redis lock? (But much less footprint). In fact on the same machine it should even work without locking as Long as you use pidfiles? Gruss Bernd -- http://bernd.eckenfels.net

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Tamás Cservenák
Hi Bernd, nothing is wrong with advisory file locking, as long as you don't store local repo on NFS ;) Will re-add file locking once I get there, as in my opinion it is the most "lightweight" MP (multi process) solution on a single host. Redis and Hazelcast are more for "farms", where several

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Michael Osipov
Tamás, Redis is so easy to install and get going in 5 minutes that I would rather see your energy go into areas which need more attention. M Am 2021-10-04 um 22:02 schrieb Tamás Cservenák: Hi Bernd, nothing is wrong with advisory file locking, as long as you don't store local repo on NFS

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Bernd Eckenfels
Even for nfs fcntl locking can work and create/ln/mv are atomic. Do you know if there is any file lock based impl available? Gruss Bernd -- http://bernd.eckenfels.net Von: Tamás Cservenák Gesendet: Monday, October 4, 2021 10:02:27 PM An: Maven Users List

Re: Local repository accessed by multiple Maven instances - how is it solved ?

2021-10-04 Thread Francois Marot
"Salut" Michael, thanks for the detailled answer. Regarding my Jenkins 'hack' you can totally forget about it: it just ensures no more than one Maven execution uses a given repo at once by locating the local repositories in a folder reflecting the executor (which are kinda Jenkins "threads"). I