maven-mvnd
maven-mvnd copied to clipboard
Duplicate plugin realm for plugin xxx
Hi, I ran a md5sum check test between 2000+ real projects built by mvnd-0.4.1 and apache-maven, and glad to say that mvnd build successfully passed most check tests.
5 projects met "Duplicate plugin realm for xxx" exception with mvnd while maven build success, but also succeed in the next recheck.
I find out that flush method in InvalidatingPluginRealmCache doesn't call super.flush(), but I'm not sure whether this is the root case.
Here is the exception stack
Caused by: java.lang.IllegalStateException: Duplicate plugin realm for plugin org.apache.maven.plugins:maven-compiler-plugin:3.6.0
at org.apache.maven.plugin.DefaultPluginRealmCache.put(DefaultPluginRealmCache.java:172)
at org.mvndaemon.mvnd.cache.invalidating.InvalidatingPluginRealmCache.put(InvalidatingPluginRealmCache.java:106)
at org.mvndaemon.mvnd.plugin.CliMavenPluginManager.setupPluginRealm(CliMavenPluginManager.java:317)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:229)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:100)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
Could you please add some steps to reproduce?
I'm sorry it's hard to reproduce. I try to rerun a project 50 times per group in serveral groups and sometimes it appears.
I'm working on the compatiablity of mvnd with maven3.2.5, and find out that I revert some logic in CliMavenPluginManger(setupPluginRealm) back to maven3.2.5, this issue can be ignored before I can guarantee it doesn't matter
according to #310 and DefaultMavenPluginManager, I roll back the 'synchronized' keywords and this exception gone in maven 3.2.5.
Maybe we can keep collectioning samples and see whether this issue reappear in maven 3.6.1.
according to #310 and DefaultMavenPluginManager, I roll back the 'synchronized' keywords and this exception gone in maven 3.2.5.
Maybe we can keep collectioning samples and see whether this issue reappear in maven 3.6.1.
So, you're saying that you think this issue is a regression caused by #310. Do I get that right ? I can try to dig a bit in that direction...
according to #310 and DefaultMavenPluginManager, I roll back the 'synchronized' keywords and this exception gone in maven 3.2.5. Maybe we can keep collectioning samples and see whether this issue reappear in maven 3.6.1.
So, you're saying that you think this issue is a regression caused by #310. Do I get that right ? I can try to dig a bit in that direction...
Yes for maven3.2.5 cause I roll back CliMavenPluginManger logic for compatiablity workaround and get this exception. Not quite sure but No for maven 3.6.1 currently, cause it hasn't be reproduced in origin mvnd yet.