kingerpku / maven-replacer-plugin

Automatically exported from code.google.com/p/maven-replacer-plugin
MIT License
0 stars 0 forks source link

Mark plugin as @threadSafe #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I run the plugin with Maven 3 in parallel mode, I get the warning:

[WARNING] The following plugins are not marked @threadSafe in xyz:
[WARNING] com.google.code.maven-replacer-plugin:maven-replacer-plugin:1.3.8

Just adding @threadSafe to the Mojo fixes this warning - assuming that the Mojo 
is actual thrad-safe, of course

Original issue reported on code.google.com by cku...@gmail.com on 8 Sep 2011 at 8:51

GoogleCodeExporter commented 8 years ago
Thanks! I will patch this and it will be in the next release. Unfortunately the 
plugin is not thread safe because it is updating files. There is no guarantee 
that some other plugin wont attempt to use the same files. This plugin is 
thread safe, but it's interactions with other plugins may not be.

Original comment by baker.st...@gmail.com on 14 Sep 2011 at 11:23

GoogleCodeExporter commented 8 years ago
Coding complete. Will be in next release.

Original comment by baker.st...@gmail.com on 15 Sep 2011 at 2:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
> Unfortunately the plugin is not thread safe because it is updating files. 
There is no guarantee that some other plugin wont attempt to use the same files.

I'm not sure that this is how @threadSafe is meant to be. IMO it is still 
guaranteed that different plugins fopr a single module will run serially. 
Thread-safety just applies to different modules being run in parallel - and 
from that point of view this plugin should be threadSafe

Original comment by cku...@gmail.com on 15 Sep 2011 at 7:31

GoogleCodeExporter commented 8 years ago
I suppose that's true. But there is the ability to change files outside of the 
module running with this plugin.
I would like to know if having "@threadSafe false" just means this plugin cant 
run in parallel with other instances of itself, or if that means the module 
which has it cant run with other modules in parallel at all. If that's the case 
I should probably set this plugin to threadSafe to allow that to occur.

Original comment by baker.st...@gmail.com on 15 Sep 2011 at 10:54

GoogleCodeExporter commented 8 years ago
IMHO, if someone changes files outside of the module, this is an usage error 
anyway - or at least she shouldn't expect this to run thread-safe environment 
afterwards.
Any 'sane' usage of this plugin should be thread-safe.

Original comment by cku...@gmail.com on 17 Sep 2011 at 12:00

GoogleCodeExporter commented 8 years ago
I agree with you. I will mark the plugin as thread-safe for the next release.

Original comment by tastytul...@gmail.com on 17 Sep 2011 at 9:47

GoogleCodeExporter commented 8 years ago
Released in 1.3.9 and will be available from Maven central repo soon.

Original comment by baker.st...@gmail.com on 17 Sep 2011 at 11:13

GoogleCodeExporter commented 8 years ago
Just issue clean up.

Original comment by baker.st...@gmail.com on 17 Sep 2012 at 12:44