This is because these plugins invoke 'generate-sources' before running themselves... Which cases stub generation to flip on and add directories for compilation.
Not sure if its related but I have found that when you use the idea resync with pom option on the maven tab it then includes the target/generated sources directory in the source path which causes idea to complain about duplicate classes.
Not sure if this is an idea problem or a stub generator problem
If this is the problem I have seen in IDEA with warnings of duplicate clases;
my solution has been to exlude groovy-stubs from project-settings -> modules insideof IDEA. Would be nice to have that done automatically.