display-plugin-updates fails when multi threaded
When running mvn versions:display-plugin-updates on my project it works as expected. When running it multi threaded with mvn -T 1C versions:display-plugin-updates it fails with:
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates (default-cli) on project aggregator: Failed to interpolate field: private org.apache.maven.model.Prerequisites org.apache.maven.model.Model.prerequisites on class: org.apache.maven.model.Model: Class org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction can not access a member of class org.apache.maven.model.Model with modifiers "private" -> [Help 1] [ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates (default-cli) on project indexer: Failed to interpolate field: private java.util.List org.apache.maven.model.Dependency.exclusions on class: org.apache.maven.model.Dependency: Class org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction can not access a member of class org.apache.maven.model.Dependency with modifiers "private" -> [Help 1] [ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates (default-cli) on project search: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates failed.: ConcurrentModificationException -> [Help 2]
I've already seen https://github.com/mojohaus/versions-maven-plugin/issues/40 which says that it should work with Maven 3.5 but I'm on 3.6 and still get the same error.
Maven 3.5.2 and plugin 2.7. Same issue.
Why was this closed?
The implementation of the model interpolator class which is causing the problem has been replaced as early as of 2.10.0 (but it's not even part of this plugin). I was not able to reproduce the issue even with 2.7, but please try doing it with 2.10.0 or later. High chances that the issue has already been fixed. @dnsbtchr
@slachiewicz seems to be resolved, I wasn't able to reproduce it