Duplicate plugin realm for plugin xxx
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 250
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 36
Description
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)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with InvalidatingPluginRealmCache.flush and compare its behavior with super.flush(). Trace the cache calls through InvalidatingPluginRealmCache.java:106 and CliMavenPluginManager.java:317, using the provided duplicate plugin realm stack trace. Done means identifying the cause and preventing the intermittent duplicate plugin realm exception while preserving successful Maven builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100