Utility methods for plugin discovery when running the Grails command line.
Constructor and description |
---|
PluginPathDiscoverySupport
(BuildSettings settings) |
Type | Name and description |
---|---|
java.io.File |
getPluginDescriptor(java.io.File dir) Retrieves the first plugin descriptor it finds in the given directory. |
java.lang.String |
getPluginName(java.io.File pluginDir) Gets the name of a plugin based on its directory. |
java.util.List<java.io.File> |
listJarsInPluginLibs() Lists all the jars found inside a plugins 'lib' directory |
java.util.List<java.io.File> |
listKnownPluginDirs() List all plugin directories that we know about: those in the project's "plugins" directory, those in the global "plugins" dir, and those declared explicitly in the build config. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Retrieves the first plugin descriptor it finds in the given directory. The search is not recursive.
dir
- The directory to search in.null
if none can be found.Gets the name of a plugin based on its directory. The method basically finds the plugin descriptor and uses the name of the class to determine the plugin name. To be honest, this class shouldn't be plugin-aware in my view, so hopefully this will only be a temporary method.
pluginDir
- The directory containing the plugin.Lists all the jars found inside a plugins 'lib' directory
List all plugin directories that we know about: those in the project's "plugins" directory, those in the global "plugins" dir, and those declared explicitly in the build config.