You can use -Dmaven.repo.local in your builds to use separate cache repos. I assume you already made sure that jenkins was compiling in separate workspace areas? Otherwise as he said, it would probably trip over itself as any other builder would. Sent from my Blackberry.
----- Original Message ----- From: Jörg Schaible <joerg.schai...@scalaris.com> To: users@maven.apache.org <users@maven.apache.org> Sent: Wed Mar 07 02:29:41 2012 Subject: Re: Maven concurrent builds Hi Guillaume, Guillaume Polet wrote: > Dear all, > > I was having some doubts regarding Maven's ability to handle properly > concurrent builds. Lately, I had several builds of our project that > failed and it seemed that it was due to interferences between concurrent > builds of the same version of the same project. > > I have a jenkins server which have 6 different builds: > * 1 for continuous build (which runs tests but does not deploy the > artifacts) > * 1 for nightly build > * 1 for releases (or almost release, ie, the pom is still in SNAPSHOT > version but could become a release) > All this is multiplied by two, because I have two versions (on 2 > different branches). > > So I had 2 questions: > 1. Can/Does Maven support concurrent builds of the same version of the > same project? Not out of the box. Since by default both builds will use the same local repository creating the same artifacts at same time, the artifacts in the repository are likely to be corrupted. > If yes, do I need to do something to achieve this? Use separate local repositories, it can be defined using separate settings.xml files or by call with a system property. Actually I don't know if Jenkins already supports something like this, because it's a general problem, see below. > If not, > is it something that Maven developers are considering? It's not the first time this problem has been risen. > 2. Can/Does Maven support concurrent builds of different versions of the > same project? They may still corrupt the metadata.xml files, but it is less likely and has AFAICS less consequences. However, every concurrent build may corrupt a shared local repository, because both builds may download the same artifacts at same time. A scenario where this might happen is when you upgrade versions (e.g. of plugins) in a common master-pom and start two parallel builds then. Actually I am not sure if you're safe when running one Maven build in parallel mode. A repository manager like Nexus might prevent this scenario by detecting the same request, but again I am not sure if it does. BTW: This is also the reason why you should never share a local repository with a network mount by multiple users. > > Cheers, > Guillaume --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org