Uses the project BuildSettings object to discover information about the installed plugin such as the jar files they provide, the plugin descriptors and so on.
Modifiers | Name | Description |
---|---|---|
static java.lang.Object |
EXCLUDED_RESOURCES |
Resources to be excluded from the final packaged plugin. |
Type | Name and description |
---|---|
PluginScopeInfo |
buildScopePluginInfo |
BuildSettings |
buildSettings |
PluginScopeInfo |
compileScopePluginInfo |
java.lang.String |
pluginDirPath |
java.lang.Object |
pluginManager |
PluginScopeInfo |
providedScopePluginInfo |
groovy.lang.Closure |
resourceResolver A default resolver used if none is specified to the resource resolving methods in this class. |
PluginScopeInfo |
testScopePluginInfo |
Constructor and description |
---|
PluginBuildSettings
(BuildSettings buildSettings) |
PluginBuildSettings
(BuildSettings buildSettings, java.lang.Object pluginManager) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
addPluginScopeInfoForDirAndInfo(PluginScopeInfo compileInfo, GrailsPluginInfo info, Resource dir) |
|
void |
clearCache() Clears any cached entries. |
|
Resource[] |
getArtefactResources() Obtains a reference to all artefact resources (all Groovy files contained within the grails-app directory of plugins or applications). |
|
Resource[] |
getArtefactResourcesForCurrentEnvironment() Returns all the artefact resources for the current environment where the environment is to be executed using the embedded container (not WAR deployed) |
|
Resource[] |
getArtefactResourcesForOne(java.lang.String projectDir) Returns an array of all artefacts in the given application or plugin directory as Spring resources. |
|
Resource[] |
getAvailableScripts() Obtains an array of all Gant scripts that are availabe for execution in a Grails application. |
|
Resource |
getBasePluginDescriptor() Obtains the 'base' plugin descriptor, which is the plugin descriptor of the current plugin project. |
|
java.util.List<Resource> |
getCompileScopedArtefactResources() @return A list of plugin infos that are supported and scoped for compile or runtime |
|
java.util.List<GrailsPluginInfo> |
getCompileScopedSupportedPluginInfos() @return A list of plugin infos that are supported and scoped for compile or runtime |
|
Resource |
getDescriptorForPlugin(Resource pluginDir) Returns the descriptor location for the given plugin directory. |
|
java.lang.String |
getGlobalPluginsPath() Obtains the path to the global plugins directory. |
|
java.util.List<Resource> |
getImplicitPluginDirectories() Returns a list of all plugin directories in both the given path and the global "plugins" directory together. |
|
Resource[] |
getInlinePluginDirectories() Returns an array of the inplace plugin locations. |
|
groovy.util.slurpersupport.GPathResult |
getMetadataForPlugin(java.lang.String pluginName) Returns XML about the plugin. |
|
groovy.util.slurpersupport.GPathResult |
getMetadataForPlugin(Resource pluginDir) Returns XML metadata for the plugin. |
|
java.util.List<java.lang.String> |
getPluginBaseDirectories() Gets a list of all the known plugin base directories (directories where plugins are installed to). |
|
Resource |
getPluginDescriptor(Resource pluginDir) Returns the plugin descriptor for the Given plugin directory. |
|
Resource[] |
getPluginDescriptors() Obtains an array of all plugin descriptors (the root classes that end with *GrailsPlugin.groovy). |
|
Resource[] |
getPluginDescriptorsForCurrentEnvironment() |
|
Resource |
getPluginDirForName(java.lang.String pluginName) Obtains a plugin directory for the given name. |
|
Resource[] |
getPluginDirectories() Obtains a list of plugin directories for the application |
|
Resource[] |
getPluginI18nDirectories() Obtains an array of all plugin i18n directories. |
|
GrailsPluginInfo |
getPluginInfo(java.lang.String pluginBaseDir) Obtains a PluginInfo for the installed plugin directory. |
|
GrailsPluginInfo |
getPluginInfoForName(java.lang.String pluginName) Obtains a PluginInfo for the installed plugin directory. |
|
GrailsPluginInfo |
getPluginInfoForSource(java.lang.String sourceFile) Gets a PluginInfo for a particular source file if its contained within that plugin |
|
GrailsPluginInfo[] |
getPluginInfos() Returns an array of PluginInfo objects |
|
GrailsPluginInfo[] |
getPluginInfos(java.lang.String pluginDirPath) |
|
Resource[] |
getPluginJarFiles() Obtains an array of all plugin provided JAR files |
|
Resource[] |
getPluginLibDirectories() Obtains an array of all plugin lib directories. |
|
Resource[] |
getPluginResourceBundles() Obtains an array of all plugin provided resource bundles. |
|
Resource[] |
getPluginScripts() .groovy").each { if (! |
|
Resource[] |
getPluginSourceDirectories() Obtains an array of all plugin provided source directories |
|
Resource[] |
getPluginSourceDirectories(java.io.File pluginDir) Gets all the plugin source directories for the given plugin directory |
|
Resource[] |
getPluginSourceFiles() /*.properties") } } |
|
Resource[] |
getPluginSourceFiles(java.io.File pluginDir) @deprecated Use getPluginSourceDirectories |
|
Resource[] |
getPluginXmlMetadata() Obtains a Resource array of the Plugin metadata XML files used to describe the plugins provided resources |
|
GrailsPluginInfo[] |
getSupportedPluginInfos() Returns only the PluginInfo objects that support the current Environment and BuildScope. |
|
Resource[] |
getUnmanagedPluginJarFiles() Obtains an array of all plugin provided JAR files for plugins that don't define a dependencies.groovy. |
|
boolean |
isGlobalPluginLocation(Resource pluginDir) Returns true if the specified plugin directory is a global plugin. |
|
boolean |
isInlinePluginLocation(Resource pluginLocation) Returns true if the specified plugin location is an inline location. |
|
java.util.List |
readMetadataFromZip(java.lang.String zipLocation) Reads plugin metadata from a plugin zip file and returns a list containing the plugin name, version and XML metadata. |
|
GrailsPluginInfo |
readPluginInfoFromZip(java.lang.String zipLocation) Reads plugin info from the zip file location |
|
void |
registerNewPluginInstall(java.io.File zip) |
|
protected void |
registerPluginZipWithScope(java.io.File pluginZip, PluginScopeInfo scopeInfo) |
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() |
Resources to be excluded from the final packaged plugin. Defined as Ant paths.
A default resolver used if none is specified to the resource resolving methods in this class.
Clears any cached entries.
Obtains a reference to all artefact resources (all Groovy files contained within the grails-app directory of plugins or applications).
Returns all the artefact resources for the current environment where the environment is to be executed using the embedded container (not WAR deployed)
Returns an array of all artefacts in the given application or plugin directory as Spring resources.
Obtains an array of all Gant scripts that are availabe for execution in a Grails application.
Obtains the 'base' plugin descriptor, which is the plugin descriptor of the current plugin project.
Returns the descriptor location for the given plugin directory. The descriptor is the Groovy file that ends with *GrailsPlugin.groovy
Obtains the path to the global plugins directory.
Returns a list of all plugin directories in both the given path and the global "plugins" directory together.
Returns an array of the inplace plugin locations.
Returns XML about the plugin.
Returns XML metadata for the plugin.
Gets a list of all the known plugin base directories (directories where plugins are installed to).
Returns the plugin descriptor for the Given plugin directory.
pluginDir
- The plugin directoryObtains an array of all plugin descriptors (the root classes that end with *GrailsPlugin.groovy).
Obtains a plugin directory for the given name.
Obtains a list of plugin directories for the application
Obtains an array of all plugin i18n directories.
Obtains a PluginInfo for the installed plugin directory.
Obtains a PluginInfo for the installed plugin directory.
Gets a PluginInfo for a particular source file if its contained within that plugin
Returns an array of PluginInfo objects
Obtains an array of all plugin provided JAR files
Obtains an array of all plugin lib directories.
Obtains an array of all plugin provided resource bundles.
.groovy").each { if (!it.file.name.startsWith('_')) scripts << it } resourceResolver("file:${grailsHome}/grails-scripts/src/main/scripts/**.groovy").each { if (!it.file.name.startsWith('_')) scripts << it } } resourceResolver("file:${basedir}/scripts/*.groovy").each { if (!it.file.name.startsWith('_')) scripts << it } pluginScripts.each { if (!it.file.name.startsWith('_')) scripts << it } resourceResolver("file:${userHome}/.grails/scripts/*.groovy").each { if (!it.file.name.startsWith('_')) scripts << it } availableScripts = scripts as Resource[] cache.availableScripts = availableScripts } return availableScripts } /** Obtains an array of plugin provided Gant scripts available to a Grails application.
Obtains an array of all plugin provided source directories
Gets all the plugin source directories for the given plugin directory
/*.properties") } } /** Obtains an array of all plugin provided source directories
Obtains a Resource array of the Plugin metadata XML files used to describe the plugins provided resources
Returns only the PluginInfo objects that support the current Environment and BuildScope.
Obtains an array of all plugin provided JAR files for plugins that don't define a dependencies.groovy.
Returns true if the specified plugin directory is a global plugin.
Returns true if the specified plugin location is an inline location.
Reads plugin metadata from a plugin zip file and returns a list containing the plugin name, version and XML metadata. Designed for use with Groovy's multiple assignment operator
zipLocation
- The zip locationReads plugin info from the zip file location
zipLocation
- The zip locationGroovy Documentation