Closed SimY4 closed 6 years ago
It is well possible that I've adjusted the guava version in one of the last plugin releases. Can you supply a minimal example configuration so I can reproduce the issue? Resolving this seems a little tricky for now:
copyOf
. It is not a mission critical statement but only used to defensively copy a list to be held in an immutable POJO.For now I'm not very happy with either of the solutions.
Hi @skuzzle
Thanks for looking into this problem.
I've put a few updates on why I think this problem is happening. In short. guava is conflicting with google-collection dependency which is a prerequisite for various other rules.
In current snapshot I've removed the copyOf
call which likely caused your problem. Would you mind trying your configuration with the current snapshot (0.13.0-SNAPSHOT
)?
@skuzzle I tested the latest version. Looks like the issue is gone.
Again, thanks for looking into this.
Released as 0.13.0
After updating to 0.12.0 enforcer plugin starts failing with:
I'm using latest enforer plugin version and latest maven version.
UPD: rolled back to 0.10.0 - the last version without this error.
UPD2: turn out the problem here lies in the fact that maven enforcer plugin shares single classloader between all enforcer rules. and guava historically has an issue of conflicting class definitions with google-collections dependency. The problem can be reproduced if you have another rule with uses google collections internally.
UPD3: google-collections is a dependency for plexus-container-default which is part of some enforcer rules prerequisites