If PluginNamingResolver created without specifying the pluginVersion, getPluginVersion() throw IllegalStateException. It is not correct, since we have a chances to analyzing version from stringContainsVersion.
IIRC, that assertion added when working with ArtifactAndVersionFinder, but as workaround, we can change that line in ArtifactAndVersionFinder with:
final String pluginNameAsArtifactId = pluginKey + "-plugin";
And then, we can remove PluginNamingResolver.of(pluginKey) static factory. And start to re-condider getPluginVersion() implementation. After all, none of operation in PluginNamingResolver should throw an exception, since even if we cannot found any version, it will return 0.0.0.
If PluginNamingResolver created without specifying the
pluginVersion, getPluginVersion() throw IllegalStateException. It is not correct, since we have a chances to analyzing version fromstringContainsVersion.IIRC, that assertion added when working with ArtifactAndVersionFinder, but as workaround, we can change that line in
ArtifactAndVersionFinderwith:And then, we can remove
PluginNamingResolver.of(pluginKey)static factory. And start to re-condidergetPluginVersion()implementation. After all, none of operation inPluginNamingResolvershould throw an exception, since even if we cannot found any version, it will return0.0.0.