jimklimov opened a new issue, #896: URL: https://github.com/apache/maven-mvnd/issues/896
Related context: > Generally, for using mvnd on the CI: > * If you expect faster builds thanks to building Maven modules in parallel, then you may consider using stock Maven's `-T` option. But be warned that it may lead to issues caused by the fact that stock Maven (as of 3.8.2) does not prevent concurrent writes to the same file in the local Maven repo. BTW mvnd 0.6.0 suffers from this problem as well. <...> _Originally posted by @ppalaga in https://github.com/apache/maven-mvnd/issues/498#issuecomment-943760507_ My question is rather this: we have CI jobs running `mvn` tests under the same user account on the same agent - whether for fully independent jobs, or for different parallel stages of the same job (spawning a burst of tests for different components etc.) This approach did hiccup with unexpected errors which we assume to be the cross-maven corruption of the same local repository, when downloads happened to run simultaneously and fetched the same files. We theorized of a few possible solutions, no idea if any are viable though (hence the question): * convert to use `mvnd`, hoping it would take care of parallelly-requested downloads to same local repo in a sane manner (even if sequentializing them internally, etc.) and transparently for `mvn` "client" calls; * use locking (e.g. Jenkins lockable resources) to ensure sequential runs, and separate the maven operations to first call an `mvn validate` before each longer build/test (assuming this would fetch all needed files) as the sequential operation, then do actual `mvn test/compile/package/etc.` as the parallel operations which rely on files fetched safely before. * With this I'm not sure if a later downloading session from another maven WOULD NOT endeavour to clean up the local repository from files it does not need for the current build this other maven is handling now. * Use separate maven local repos for each independent operation. This raises a few concerns however: * Seems to be wasteful on disk space, and on losing the benefits of having pre-fetched files on the workers -- especially if(?) we can not layer several local repos, e.g. use a separate location for "our" components, but a shared one for third-party dependencies. * Internet lore https://mkyong.com/maven/where-is-maven-local-repository/ or https://stackoverflow.com/questions/28767088/maven-local-repository-setting-being-overridden hints how... Any insights would be most welcome :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org