We use the exec-maven-plugin (a thread-safe plugin) to call msbuild for dotnet builds within Maven. We have 8 dotnet projects with 3 of them depending on shared libraries in another directory in the repo (a total of 500 projects).
With multi-threading on (4 threads), these dotnet projects always fail because the msbuild instances are all trying to lock the files in the shared libraries and can't open them in the other instances. This is on Windows 10 with NTFS. With only one thread, they always build successfully. Note that I don't use the multi-threading capabilities of msbuild because that would be silly. To get this reactor working I can either - package up the shared libraries as part of the build, and unpack them into every dotnet project that needs them (using https://maven.apache.org/plugins/maven-remote-resources-plugin/ ) Or ensure that no 2 instances of msbuild ever run at the same time, by either - chaining the dotnet projects together as one sequence of dependent projects (ridiculous) - building the dotnet projects separately with their own maven invocation - turning off multi-threading for the whole reactor Are there other options? Would it be feasible to consider adding a further thread-safe check in the plugin architecture whereby a configuration could be set to enforce that no two executions with the same id will ever run simultaneously? Thanks, Delany