killbill-platform icon indicating copy to clipboard operation
killbill-platform copied to clipboard

kpm - not setting plugin version should possible in PluginNamingResolver

Open xsalefter opened this issue 1 year ago • 0 comments

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.

xsalefter avatar Feb 08 '24 20:02 xsalefter