You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Debraj Manna <su...@gmail.com> on 2019/05/26 13:48:46 UTC

Maven local repo in a common global directory for multiple parallel execution

I have a machine in which multiple parallel maven execution happen . Each
execution executes the below command in a seperate workspace directory

mvn -f main/pom.xml clean package -DskipTests -T 6

Can someone let me know should I use a seperate maven local repo path (
-Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common .m2
directory for all parallel runs? What is the best practice?


   - Maven Version 3.5
   - Java 8

Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Debraj Manna <su...@gmail.com>.
Yes it is jenkins.

Can you please explain why do you suggest to use separate caches / local
repo for each execution?

On Sun, May 26, 2019 at 7:26 PM Karl Heinz Marbaise <kh...@gmx.de>
wrote:

> Hi,
> On 26.05.19 15:48, Debraj Manna wrote:
> > I have a machine in which multiple parallel maven execution happen . Each
> > execution executes the below command in a seperate workspace directory
>
> Kind of a build server with a CI solution like Jenkins?
>
> >
> > mvn -f main/pom.xml clean package -DskipTests -T 6
>
> Why using "-f main/pom.xml" ?
>
>
> >
> > Can someone let me know should I use a seperate maven local repo path (
> > -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common
> .m2
> > directory for all parallel runs? What is the best practice?
>
> I can recommend to use separate caches for each execution..
>
>
> >
> >
> >     - Maven Version 3.5
>
> I would suggest to upgrade to most recent Maven version.. Also define
> all versions of all plugins in your build...
>
> Kind regards
> Karl Heinz Marbaise
>
> >     - Java 8
> >
>

Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
On 26.05.19 15:48, Debraj Manna wrote:
> I have a machine in which multiple parallel maven execution happen . Each
> execution executes the below command in a seperate workspace directory

Kind of a build server with a CI solution like Jenkins?

>
> mvn -f main/pom.xml clean package -DskipTests -T 6

Why using "-f main/pom.xml" ?


>
> Can someone let me know should I use a seperate maven local repo path (
> -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common .m2
> directory for all parallel runs? What is the best practice?

I can recommend to use separate caches for each execution..


>
>
>     - Maven Version 3.5

I would suggest to upgrade to most recent Maven version.. Also define
all versions of all plugins in your build...

Kind regards
Karl Heinz Marbaise

>     - Java 8
>

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


Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Francois MAROT <fr...@gmail.com>.
Hi,

if you run multiple jobs concurrently but all are agnostic to one another (I
mean they only depend on Maven Central's non SNAPSHOT dependencies) and if
disk space is a problem then you can try to have a common local repo.

But if you want to play safe, you should use a per Jenkins executor repo (an
executor only runs one job at a time, and jobs should be able to share their
repo sequentially). You can read more here:
http://maven.40175.n5.nabble.com/Not-able-to-read-jars-in-repo-intermittently-tp5928990p5928998.html

Regards



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

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


RE: EXTERNAL: Re: Maven local repo in a common global directory for multiple parallel execution

Posted by "Marlow, Andrew" <An...@fisglobal.com.INVALID>.
Jason is correct. And it is still a problem.

-----Original Message-----
From: Jason Young <ja...@procentive.com>
Sent: 28 May 2019 17:39
To: Maven Users List <us...@maven.apache.org>
Subject: EXTERNAL: Re: Maven local repo in a common global directory for multiple parallel execution

Bernd, I believe the OP is talking about using the -T argument to build projects concurrently, not running concurrent Jenkins builds. However, I would still absolutely use per-executor repos before having more than one concurrent Maven build, whether its the same job or different Maven jobs.

On Mon, May 27, 2019 at 5:41 AM Bernd Eckenfels <ec...@zusammenkunft.net>
wrote:

> Hello,
>
> It is the other way around, there might be situations where one job
> relies on the installed artifacts from the other, in this case you
> would need a shared Repo. It is however bad style. In all other cases
> you can use a
> executor- or even workspace-local local repository if you have enough space.
>
> The advantage of avoiding concurrent access is that you get less
> influences from one job to the other (especially if you work with
> snapshots or multiple different upstream artifacts with same version
> in different
> Repos) and that there is no concurrent downloads (which in itself
> sometimes leads to checksum errors).
>
> Gruss
> Bernd
> --
> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbernd
> .eckenfels.net&amp;data=02%7C01%7CAndrew.Marlow%40fisglobal.com%7C8fd6
> 51b7ee0e4bee5fab08d6e38b273f%7Ce3ff91d834c84b15a0b418910a6ac575%7C0%7C
> 0%7C636946584129679466&amp;sdata=OFzDcE0QESYtETXVChvNrrtqiWAuCikXRg1VM
> iZzgrY%3D&amp;reserved=0
>
> ________________________________
> Von: Debraj Manna <su...@gmail.com>
> Gesendet: Montag, Mai 27, 2019 11:29 AM
> An: Maven Users List
> Betreff: Re: Maven local repo in a common global directory for
> multiple parallel execution
>
> Yes disk required will be more .
>
> I don't have a requirement where one of my projects requires artifact
> created by another. So I can use a common local repo for all parallel
> executions?
>
> On Mon, May 27, 2019 at 11:34 AM Golan, Yaron
> <ya...@intl.att.com>
> wrote:
>
> > Please remember that you need much bigger disk space as you are
> > duplicating binaries.
> >
> >
> > -----Original Message-----
> > From: Debraj Manna <su...@gmail.com>
> > Sent: Sunday, May 26, 2019 4:49 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Maven local repo in a common global directory for multiple
> > parallel execution
> >
> > I have a machine in which multiple parallel maven execution happen .
> > Each execution executes the below command in a seperate workspace
> > directory
> >
> > mvn -f main/pom.xml clean package -DskipTests -T 6
> >
> > Can someone let me know should I use a seperate maven local repo
> > path (
> > -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a
> > common
> > .m2 directory for all parallel runs? What is the best practice?
> >
> >
> > - Maven Version 3.5
> > - Java 8
> >
>
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. FIS is a trading name of the following companies: Fidelity Information Services Ltd (registered in England No.02225203), FIS Payments (UK) Ltd (No.04215488), FIS Asiapacrim Holdings Ltd (No.06707320), Certegy Card Services Ltd (No.03517639) and Efunds International Ltd (No.01930117), all with their registered office at Floor 1, 51/53 Hagley Road, Birmingham B16 8TU, United Kingdom; and FIS Payments (Ireland) Ltd (registered in Ireland No.126879), with its registered office at 25/28 North Wall Quay, Dublin 1, D01 H104, Ireland. FIS Payments (UK) Ltd is authorised and regulated by the Financial Conduct Authority; some services are covered by the Financial Ombudsman Service (in the UK). Calls to and from the companies may be recorded for quality purposes. All of the above companies are part of FIS (Fidelity National Information Services Inc.).

Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Jason Young <ja...@procentive.com>.
Bernd, I believe the OP is talking about using the -T argument to build
projects concurrently, not running concurrent Jenkins builds. However, I
would still absolutely use per-executor repos before having more than one
concurrent Maven build, whether its the same job or different Maven jobs.

On Mon, May 27, 2019 at 5:41 AM Bernd Eckenfels <ec...@zusammenkunft.net>
wrote:

> Hello,
>
> It is the other way around, there might be situations where one job relies
> on the installed artifacts from the other, in this case you would need a
> shared Repo. It is however bad style. In all other cases you can use a
> executor- or even workspace-local local repository if you have enough space.
>
> The advantage of avoiding concurrent access is that you get less
> influences from one job to the other (especially if you work with snapshots
> or multiple different upstream artifacts with same version in different
> Repos) and that there is no concurrent downloads (which in itself sometimes
> leads to checksum errors).
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
>
> ________________________________
> Von: Debraj Manna <su...@gmail.com>
> Gesendet: Montag, Mai 27, 2019 11:29 AM
> An: Maven Users List
> Betreff: Re: Maven local repo in a common global directory for multiple
> parallel execution
>
> Yes disk required will be more .
>
> I don't have a requirement where one of my projects requires artifact
> created by another. So I can use a common local repo for all parallel
> executions?
>
> On Mon, May 27, 2019 at 11:34 AM Golan, Yaron <ya...@intl.att.com>
> wrote:
>
> > Please remember that you need much bigger disk space as you are
> > duplicating binaries.
> >
> >
> > -----Original Message-----
> > From: Debraj Manna <su...@gmail.com>
> > Sent: Sunday, May 26, 2019 4:49 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Maven local repo in a common global directory for multiple
> > parallel execution
> >
> > I have a machine in which multiple parallel maven execution happen . Each
> > execution executes the below command in a seperate workspace directory
> >
> > mvn -f main/pom.xml clean package -DskipTests -T 6
> >
> > Can someone let me know should I use a seperate maven local repo path (
> > -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common
> > .m2 directory for all parallel runs? What is the best practice?
> >
> >
> > - Maven Version 3.5
> > - Java 8
> >
>

Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
Hello,

It is the other way around, there might be situations where one job relies on the installed artifacts from the other, in this case you would need a shared Repo. It is however bad style. In all other cases you can use a executor- or even workspace-local local repository if you have enough space.

The advantage of avoiding concurrent access is that you get less influences from one job to the other (especially if you work with snapshots or multiple different upstream artifacts with same version in different Repos) and that there is no concurrent downloads (which in itself sometimes leads to checksum errors).

Gruss
Bernd
--
http://bernd.eckenfels.net

________________________________
Von: Debraj Manna <su...@gmail.com>
Gesendet: Montag, Mai 27, 2019 11:29 AM
An: Maven Users List
Betreff: Re: Maven local repo in a common global directory for multiple parallel execution

Yes disk required will be more .

I don't have a requirement where one of my projects requires artifact
created by another. So I can use a common local repo for all parallel
executions?

On Mon, May 27, 2019 at 11:34 AM Golan, Yaron <ya...@intl.att.com>
wrote:

> Please remember that you need much bigger disk space as you are
> duplicating binaries.
>
>
> -----Original Message-----
> From: Debraj Manna <su...@gmail.com>
> Sent: Sunday, May 26, 2019 4:49 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Maven local repo in a common global directory for multiple
> parallel execution
>
> I have a machine in which multiple parallel maven execution happen . Each
> execution executes the below command in a seperate workspace directory
>
> mvn -f main/pom.xml clean package -DskipTests -T 6
>
> Can someone let me know should I use a seperate maven local repo path (
> -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common
> .m2 directory for all parallel runs? What is the best practice?
>
>
> - Maven Version 3.5
> - Java 8
>

Re: Maven local repo in a common global directory for multiple parallel execution

Posted by Debraj Manna <su...@gmail.com>.
Yes disk required will be more .

I don't have a requirement where one of my projects requires artifact
created by another. So I can use a common local repo for all parallel
executions?

On Mon, May 27, 2019 at 11:34 AM Golan, Yaron <ya...@intl.att.com>
wrote:

> Please remember that you need much bigger disk space as you are
> duplicating binaries.
>
>
> -----Original Message-----
> From: Debraj Manna <su...@gmail.com>
> Sent: Sunday, May 26, 2019 4:49 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Maven local repo in a common global directory for multiple
> parallel execution
>
> I have a machine in which multiple parallel maven execution happen . Each
> execution executes the below command in a seperate workspace directory
>
> mvn -f main/pom.xml clean package -DskipTests -T 6
>
> Can someone let me know should I use a seperate maven local repo path (
> -Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common
> .m2 directory for all parallel runs? What is the best practice?
>
>
>    - Maven Version 3.5
>    - Java 8
>

RE: Maven local repo in a common global directory for multiple parallel execution

Posted by "Golan, Yaron" <ya...@intl.att.com>.
Please remember that you need much bigger disk space as you are duplicating binaries.


-----Original Message-----
From: Debraj Manna <su...@gmail.com> 
Sent: Sunday, May 26, 2019 4:49 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Maven local repo in a common global directory for multiple parallel execution

I have a machine in which multiple parallel maven execution happen . Each execution executes the below command in a seperate workspace directory

mvn -f main/pom.xml clean package -DskipTests -T 6

Can someone let me know should I use a seperate maven local repo path (
-Dmaven.repo.local=$MAVEN_REPO) for each execution or I can use a common .m2 directory for all parallel runs? What is the best practice?


   - Maven Version 3.5
   - Java 8