4

I have few maven plugins that were developed in my team, and those plugins are not marked @threadSafe. I have run around 50 jobs and I do not see in inconsistency, but I would like to know if there is way to verify this programmatically.

And what would be the things to look for which will make the plugin unsafe for multithreading

Optimus
  • 697
  • 2
  • 8
  • 22
  • I would also like to know whether thread safety is regarded only to the internals of the Mojo or actually to the outcome. Most maven plugins do some file generation and doing that twice at the same time doesn't seem like a good idea. However, is this really meant with `@threadSafe`? For example the Maven Compiler Plugin 2.3.1 is marked as threadsafe, but I can barely imagine running it twice at the same time for the same module works. – radlan Oct 25 '18 at 07:36
  • @radlan how is it possible to compile simultaneously for the same module? – caduceus Jan 25 '22 at 06:16

0 Answers0