|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.resolve.PluginInstallEngine
class PluginInstallEngine extends java.lang.Object
Manages the installation and uninstallation of plugins from a Grails project.
Field Summary | |
---|---|
protected java.lang.Object |
ant
|
protected java.lang.Object |
applicationPluginsLocation
|
protected java.lang.Object |
globalPluginsLocation
|
protected Metadata |
metadata
|
protected PluginBuildSettings |
pluginSettings
|
protected PluginResolveEngine |
resolveEngine
|
protected BuildSettings |
settings
|
Property Summary | |
---|---|
static java.lang.Object |
CORE_PLUGINS
|
groovy.lang.Closure |
errorHandler
|
groovy.lang.Closure |
eventHandler
|
java.util.List |
installedPlugins
plugins that were installed in the last execution of installPlugin |
boolean |
isInteractive
|
java.lang.Object |
pluginDirVariableStore
|
groovy.lang.Closure |
pluginScriptRunner
|
groovy.lang.Closure |
postInstallEvent
|
groovy.lang.Closure |
postUninstallEvent
|
Constructor Summary | |
PluginInstallEngine(BuildSettings settings)
|
|
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs)
|
|
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs, Metadata md)
|
|
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs, Metadata md, groovy.util.AntBuilder ant)
|
Method Summary | |
---|---|
protected java.lang.Object
|
addJarsToRootLoader(org.apache.ivy.core.module.descriptor.Configuration dependencyConfiguration, java.util.Collection pluginJars)
|
protected void
|
assertNoExistingInlinePlugin(java.lang.String name)
|
protected boolean
|
checkExistingPluginInstall(java.lang.String name, java.lang.Object version, boolean isResolve = true)
Checks an existing plugin path to install and returns true if the installation should be aborted or false if it should continue |
void
|
checkPluginsToUninstall()
|
protected void
|
checkPluginsToUninstall(java.util.Collection pluginDeps)
|
protected java.util.Collection
|
findMissingOrUpgradePlugins(java.util.Collection descriptors)
|
boolean
|
installPlugin(java.lang.String name, java.lang.String version = null, boolean globalInstall = false)
Installs a plugin for the given name and optional version. |
boolean
|
installPlugin(java.io.File zipFile, boolean globalInstall = false, boolean overwrite = false)
Installs a plugin from the given ZIP file |
boolean
|
installPlugin(java.net.URL zipURL, boolean globalInstall = false)
Installs a plugin from the given URL |
protected boolean
|
installPluginZipInternal(java.lang.String name, java.lang.String version, java.io.File pluginZip, boolean globalInstall = false, boolean overwrite = false, boolean isResolve = false)
|
void
|
installPlugins(java.util.Collection plugins)
Installs a list of plugins |
boolean
|
installResolvedPlugin(java.io.File zipFile)
Installs a plugin from the given ZIP file. |
boolean
|
isNotInlinePluginLocation(java.io.File pluginDir)
Check to see if the plugin directory is in plugins home. |
protected java.lang.Object
|
postInstall(java.lang.String pluginInstallPath)
|
protected java.lang.Object
|
postUninstall()
|
protected java.util.Map
|
processPluginDependencies(java.lang.String pluginName, groovy.util.slurpersupport.GPathResult pluginXml)
|
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 |
protected java.lang.Object
|
readPluginXmlMetadata(java.lang.String pluginDirName)
|
void
|
registerPluginWithMetadata(java.lang.String pluginName, java.lang.Object pluginVersion)
Registers a plugin name and version as installed according to the plugin metadata |
void
|
resolvePluginDependencies()
This method will resolve the current dependencies and install any missing plugins or upgrades and remove any plugins that aren't present in the metadata but are installed |
protected void
|
resolvePluginJarDependencies(java.lang.Object fullPluginName, java.lang.Object pluginName, java.lang.Object pluginInstallPath, java.util.Map runtimeDependencies = [:])
|
void
|
uninstallPlugin(java.lang.String name, java.lang.String version = null)
Uninstalls a plugin for the given name and optional version |
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() |
Field Detail |
---|
protected java.lang.Object ant
protected java.lang.Object applicationPluginsLocation
protected java.lang.Object globalPluginsLocation
protected Metadata metadata
protected PluginBuildSettings pluginSettings
protected PluginResolveEngine resolveEngine
protected BuildSettings settings
Property Detail |
---|
static final java.lang.Object CORE_PLUGINS
groovy.lang.Closure errorHandler
groovy.lang.Closure eventHandler
java.util.List installedPlugins
boolean isInteractive
java.lang.Object pluginDirVariableStore
groovy.lang.Closure pluginScriptRunner
groovy.lang.Closure postInstallEvent
groovy.lang.Closure postUninstallEvent
Constructor Detail |
---|
PluginInstallEngine(BuildSettings settings)
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs)
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs, Metadata md)
PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs, Metadata md, groovy.util.AntBuilder ant)
Method Detail |
---|
protected java.lang.Object addJarsToRootLoader(org.apache.ivy.core.module.descriptor.Configuration dependencyConfiguration, java.util.Collection pluginJars)
protected void assertNoExistingInlinePlugin(java.lang.String name)
protected boolean checkExistingPluginInstall(java.lang.String name, java.lang.Object version, boolean isResolve = true)
name
- The plugin nameversion
- The plugin version
void checkPluginsToUninstall()
protected void checkPluginsToUninstall(java.util.Collection pluginDeps)
protected java.util.Collection findMissingOrUpgradePlugins(java.util.Collection descriptors)
boolean installPlugin(java.lang.String name, java.lang.String version = null, boolean globalInstall = false)
name
- The plugin nameversion
- The plugin version (optional)globalInstall
- Whether to install globally or not (optional)
boolean installPlugin(java.io.File zipFile, boolean globalInstall = false, boolean overwrite = false)
zipFile
- The plugin zip fileglobalInstall
- Whether it is a global install or not (optional)
boolean installPlugin(java.net.URL zipURL, boolean globalInstall = false)
zipURL
- The zip URLglobalInstall
- Whether it is a global install or not (optional)
protected boolean installPluginZipInternal(java.lang.String name, java.lang.String version, java.io.File pluginZip, boolean globalInstall = false, boolean overwrite = false, boolean isResolve = false)
void installPlugins(java.util.Collection plugins)
params
- A list of plugins defined each by a ModuleRevisionId
boolean installResolvedPlugin(java.io.File zipFile)
zipFile
- The plugin zip file
boolean isNotInlinePluginLocation(java.io.File pluginDir)
protected java.lang.Object postInstall(java.lang.String pluginInstallPath)
protected java.lang.Object postUninstall()
protected java.util.Map processPluginDependencies(java.lang.String pluginName, groovy.util.slurpersupport.GPathResult pluginXml)
java.util.List readMetadataFromZip(java.lang.String zipLocation)
zipLocation
- The zip location
GrailsPluginInfo readPluginInfoFromZip(java.lang.String zipLocation)
zipLocation
- The zip location
protected java.lang.Object readPluginXmlMetadata(java.lang.String pluginDirName)
void registerPluginWithMetadata(java.lang.String pluginName, java.lang.Object pluginVersion)
pluginName
- the name of the pluginpluginVersion
- the version of the plugin
void resolvePluginDependencies()
protected void resolvePluginJarDependencies(java.lang.Object fullPluginName, java.lang.Object pluginName, java.lang.Object pluginInstallPath, java.util.Map runtimeDependencies = [:])
void uninstallPlugin(java.lang.String name, java.lang.String version = null)
name
- The plugin nameversion
- The version
Groovy Documentation