Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.cli.support
[Java] Class PluginPathDiscoverySupport

    java.lang.Object
      org.codehaus.groovy.grails.cli.support.PluginPathDiscoverySupport

    public class PluginPathDiscoverySupport
    extends java.lang.Object

Utility methods for plugin discovery when running the Grails command line.

Authors:
  Graeme Rocher

Since:
  2.0

Constructor Summary
`PluginPathDiscoverySupport(BuildSettings settings)`

Method Summary
`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` | `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 java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()

Constructor Detail

### PluginPathDiscoverySupport

    public PluginPathDiscoverySupport(BuildSettings settings)

Method Detail

### getPluginDescriptor

    public java.io.File getPluginDescriptor(java.io.File dir)

  Retrieves the first plugin descriptor it finds in the given directory. The search is not recursive.
  Parameters:
    `dir` - The directory to search in.
  Returns:
    The location of the plugin descriptor, or `null` if none can be found.

### getPluginName

    public java.lang.String getPluginName(java.io.File pluginDir)

  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.
  Parameters:
    `pluginDir` - The directory containing the plugin.
  Returns:
    The name of the plugin contained in the given directory.

### listKnownPluginDirs

    public java.util.List 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.
  Returns:
    A list of all known plugin directories, or an empty list if there are none.

Groovy Documentation