public class ClasspathPluginFinder extends java.lang.Object
Discovers Grails plugins from META-INF/grails-plugin.xml descriptors available on the classpath.
For each descriptor, this finder attempts to load the declared plugin classes, extract their PluginMetadata, resolve any plugin configuration resource, and assemble the results into PluginInfo instances.
Discovery is intentionally tolerant: individual plugin load failures are logged and skipped so the remaining classpath plugins can still be discovered.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public java.util.List<PluginInfo> |
findClasspathPlugins(java.lang.ClassLoader classLoader, java.lang.String targetGrailsVersion)Discovers classpath plugins for the supplied Grails version. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Discovers classpath plugins for the supplied Grails version.
This method scans META-INF/grails-plugin.xml descriptors via
PluginUtils.scanPluginDescriptorResources, iterates over each descriptor's
declared plugin classes, and then builds PluginInfo instances from the loaded plugin class,
extracted metadata, and optional plugin configuration resource.
PluginInfo.isGrailsVersionCompatible is invoked for each discovered plugin so the compatibility check is evaluated during discovery. Any failure while loading or inspecting an individual plugin class is logged and does not stop discovery of the remaining plugins.
classLoader - the class loader used to locate descriptors and load plugin classestargetGrailsVersion - the Grails version the discovered plugins should be checked against