Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[papyrus-rt-dev] Maven Repos are not thread-safe

Hi all,

 

I’ve been quickly looking at a few builds on the Papyrus-RT Hudson instance, and noticed that almost all Jobs use the shared Maven repository (And some of these jobs use ‘clean install’ as well)

 

The Maven Repository is not thread safe, so having all jobs using the same repository is a big hazard. Additionally, using ‘clean install’ on jobs such as Gerrit means that the repository will grow very quickly: after each Gerrit build, a copy of Papyrus-RT is added to the repository

 

So I’d recommend the following:

 

-          Use ‘private repository’ for all jobs (Under ‘Invoke Maven 3’)

-          Use ‘clean verify’ instead of ‘clean install’ (Artifacts are published to a P2 repository, there is no need to store them in the build’s Maven repository). This will reduce disk usage, and make builds more consistent (Maven may look into this repository to find missing artifacts... So it might end up using a plug-in built by another job instead of failing because the plugin cannot be resolved)

-          Clean the shared Maven repository (/home/hudson/genie.papyrus-rt/.m2/repository)

 

Using private repositories may not be exactly straightforward, as the repository will be located in the Workspace and may be conflicting with the Git repository (Git will try to version the M2 repo, and may remove it when e.g. doing a git clean)

 

Note that huge .m2 repositories may also kill the performances of Maven/Tycho builds


Regards,
Camille


Back to the top