Package: org.codehaus.groovy.grails.resolve

## [Java] Class AbstractIvyDependencyManager

- org.codehaus.groovy.grails.resolve.AbstractIvyDependencyManager

- Base class for IvyDependencyManager with some logic implemented in Java.

  Authors:
    Graeme Rocher
  Since:
    1.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static org.apache.ivy.core.module.descriptor.Configuration` | `AGENT_CONFIGURATION` |
    `static java.util.List<org.apache.ivy.core.module.descriptor.Configuration>` | `ALL_CONFIGURATIONS` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `BUILD_CONFIGURATION` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `COMPILE_CONFIGURATION` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `DOCS_CONFIGURATION` |
    `static org.apache.ivy.core.module.descriptor.ExcludeRule[]` | `NO_EXCLUDE_RULES` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `PROVIDED_CONFIGURATION` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `RUNTIME_CONFIGURATION` |
    `static java.lang.String` | `SNAPSHOT_CHANGING_PATTERN` |
    `static org.apache.ivy.core.module.descriptor.Configuration` | `TEST_CONFIGURATION` |
    `protected java.lang.String` | `applicationName` |
    `protected java.lang.String` | `applicationVersion` |
    `protected BuildSettings` | `buildSettings` |
    `protected java.lang.String[]` | `configurationNames` |
    `protected java.util.Set<org.apache.ivy.core.module.id.ModuleRevisionId>` | `dependencies` |
    `protected java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor>` | `dependencyDescriptors` |
    `protected boolean` | `hasApplicationDependencies` |
    `protected boolean` | `includeJavadoc` |
    `protected boolean` | `includeSource` |
    `protected org.apache.ivy.core.settings.IvySettings` | `ivySettings` |
    `protected boolean` | `legacyResolve` |
    `protected Metadata` | `metadata` |
    `protected java.util.Set<java.lang.String>` | `metadataRegisteredPluginNames` |
    `protected org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor` | `moduleDescriptor` |
    `protected java.util.Set<org.apache.ivy.core.module.id.ModuleId>` | `modules` |
    `protected java.util.Map<java.lang.String, java.util.Collection<org.apache.ivy.core.module.id.ModuleRevisionId>>` | `orgToDepMap` |
    `protected java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor>` | `pluginDependencyDescriptors` |
    `protected java.util.Map<java.lang.String, org.apache.ivy.core.module.descriptor.DependencyDescriptor>` | `pluginNameToDescriptorMap` |
    `protected boolean` | `readPom` |
    `protected java.util.Collection<java.lang.String>` | `usedConfigurations` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AbstractIvyDependencyManager (org.apache.ivy.core.settings.IvySettings ivySettings, BuildSettings buildSettings, Metadata metadata)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope)` @deprecated use registerDependency(String, EnhancedDefaultDependencyDescriptor)
    `void` | `configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope, boolean pluginMode)` @deprecated use registerDependency(String, EnhancedDefaultDependencyDescriptor) or registerPluginDependency(String EnhancedDefaultDependencyDescriptor)
    `IvyDependencyManager` | `createCopy(BuildSettings settings)`
    `protected org.apache.ivy.core.module.id.ArtifactId` | `createExcludeArtifactId(java.lang.String excludeName)`
    `protected org.apache.ivy.core.module.id.ArtifactId` | `createExcludeArtifactId(java.lang.String excludeName, java.lang.String group)`
    `org.apache.ivy.core.module.descriptor.ModuleDescriptor` | `createModuleDescriptor()`
    `java.lang.String` | `getApplicationName()`
    `java.lang.String` | `getApplicationVersion()`
    `BuildSettings` | `getBuildSettings()`
    `org.apache.ivy.plugins.resolver.ChainResolver` | `getChainResolver()`
    `java.util.Map<java.lang.String, java.util.List<java.lang.String>>` | `getConfigurationMappings()`
    `java.lang.String[]` | `getConfigurationNames()`
    `java.util.Set<org.apache.ivy.core.module.id.ModuleRevisionId>` | `getDependencies()` Obtains a list of dependencies defined in the project
    `org.apache.ivy.core.settings.IvySettings` | `getIvySettings()`
    `org.apache.ivy.util.MessageLogger` | `getLogger()`
    `Metadata` | `getMetadata()`
    `java.util.Set<java.lang.String>` | `getMetadataRegisteredPluginNames()`
    `org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor` | `getModuleDescriptor()`
    `org.apache.ivy.core.module.descriptor.DependencyDescriptor` | `getPluginDependencyDescriptor(java.lang.String pluginName)` Obtains a particular DependencyDescriptor by the plugin name
    `java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor>` | `getPluginDependencyDescriptors()` Obtains a set of plugin dependency descriptors defined in the project
    `java.util.Set<java.lang.String>` | `getPluginDependencyNames()` Obtains a set of plugins this application is dependent onb
    `java.util.Set<java.lang.String>` | `getPluginExcludes(java.lang.String plugin)`
    `boolean` | `getReadPom()`
    `org.apache.ivy.core.resolve.ResolveEngine` | `getResolveEngine()`
    `java.util.Collection<java.lang.String>` | `getUsedConfigurations()`
    `boolean` | `hasApplicationDependencies()` Returns true if the application has any dependencies that are not inherited from the framework or other plugins
    `protected void` | `initializeModuleDescriptor()`
    `boolean` | `isExcludedFromPlugin(java.lang.String plugin, java.lang.String dependencyName)`
    `boolean` | `isExcludedFromPlugin(org.apache.ivy.core.module.descriptor.DependencyDescriptor currentPlugin, org.apache.ivy.core.module.id.ArtifactId dependency)`
    `boolean` | `isLegacyResolve()` Whether the legacy approach of parsing dependencies.groovy in addition to pom.xml should be used during dependency resolution
    `boolean` | `isOffline()`
    `boolean` | `isPluginTransitive(java.lang.String pluginName)` Returns whether a plugin is transitive, ie whether its dependencies are resolved transitively
    `boolean` | `isPluginTransitivelyIncluded(java.lang.String pluginName)` Whether the plugin is directly included or a transitive dependency of another plugin
    `void` | `parseDependencies(groovy.lang.Closure definition)` Parses the Ivy DSL definition
    `void` | `parseDependencies(java.lang.String pluginName, groovy.lang.Closure<?> definition)` Parses dependencies of a plugin.
    `void` | `parseDependencies(java.lang.String pluginName, groovy.lang.Closure<?> definition, org.apache.ivy.core.module.descriptor.ExcludeRule[] excludeRules)` Parses dependencies of a plugin.
    `org.apache.ivy.core.module.descriptor.DependencyDescriptor[]` | `readDependenciesFromPOM()`
    `void` | `registerDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)` Registers a JAR dependency with the dependency manager.
    `void` | `registerPluginDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)` Registers a plugin dependency (as in Grails plugin).
    `void` | `setApplicationName(java.lang.String applicationName)`
    `void` | `setApplicationVersion(java.lang.String applicationVersion)`
    `void` | `setChainResolver(org.apache.ivy.plugins.resolver.ChainResolver chainResolver)`
    `void` | `setIncludeJavadoc(boolean includeJavadoc)`
    `void` | `setIncludeSource(boolean includeSource)`
    `void` | `setLegacyResolve(boolean legacyResolve)`
    `void` | `setLogger(org.apache.ivy.util.MessageLogger logger)`
    `void` | `setMetadataRegisteredPluginNames(java.util.Set<java.lang.String> metadataRegisteredPluginNames)`
    `void` | `setModuleDescriptor(org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor moduleDescriptor)`
    `void` | `setOffline(boolean offline)`
    `void` | `setReadPom(boolean flag)`
    `void` | `setResolveEngine(org.apache.ivy.core.resolve.ResolveEngine resolveEngine)`
    `void` | `setUsedConfigurations(java.util.Collection<java.lang.String> usedConfigurations)`

  - ### Inherited Methods Summary

    Inherited Methods
    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()`

- - ### Field Detail

    - #### public static org.apache.ivy.core.module.descriptor.Configuration AGENT_CONFIGURATION

    - #### public static java.util.List<org.apache.ivy.core.module.descriptor.Configuration> ALL_CONFIGURATIONS

    - #### public static org.apache.ivy.core.module.descriptor.Configuration BUILD_CONFIGURATION

    - #### public static org.apache.ivy.core.module.descriptor.Configuration COMPILE_CONFIGURATION

    - #### public static org.apache.ivy.core.module.descriptor.Configuration DOCS_CONFIGURATION

    - #### public static final org.apache.ivy.core.module.descriptor.ExcludeRule[] NO_EXCLUDE_RULES

    - #### public static org.apache.ivy.core.module.descriptor.Configuration PROVIDED_CONFIGURATION

    - #### public static org.apache.ivy.core.module.descriptor.Configuration RUNTIME_CONFIGURATION

    - #### public static final java.lang.String SNAPSHOT_CHANGING_PATTERN

    - #### public static org.apache.ivy.core.module.descriptor.Configuration TEST_CONFIGURATION

    - #### protected java.lang.String applicationName

    - #### protected java.lang.String applicationVersion

    - #### protected final BuildSettings buildSettings

    - #### protected java.lang.String[] configurationNames

    - #### protected java.util.Set<org.apache.ivy.core.module.id.ModuleRevisionId> dependencies

    - #### protected java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor> dependencyDescriptors

    - #### protected boolean hasApplicationDependencies

    - #### protected boolean includeJavadoc

    - #### protected boolean includeSource

    - #### protected final org.apache.ivy.core.settings.IvySettings ivySettings

    - #### protected boolean legacyResolve

    - #### protected final Metadata metadata

    - #### protected java.util.Set<java.lang.String> metadataRegisteredPluginNames

    - #### protected org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor moduleDescriptor

    - #### protected java.util.Set<org.apache.ivy.core.module.id.ModuleId> modules

    - #### protected java.util.Map<java.lang.String, java.util.Collection<org.apache.ivy.core.module.id.ModuleRevisionId>> orgToDepMap

    - #### protected java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor> pluginDependencyDescriptors

    - #### protected java.util.Map<java.lang.String, org.apache.ivy.core.module.descriptor.DependencyDescriptor> pluginNameToDescriptorMap

    - #### protected boolean readPom

    - #### protected java.util.Collection<java.lang.String> usedConfigurations

  - ### Constructor Detail

    - #### public AbstractIvyDependencyManager(org.apache.ivy.core.settings.IvySettings ivySettings, BuildSettings buildSettings, Metadata metadata)

  - ### Method Detail

    - #### @java.lang.Deprecated public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope)

      deprecated:
        use registerDependency(String, EnhancedDefaultDependencyDescriptor)

    - #### @java.lang.Deprecated public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope, boolean pluginMode)

      deprecated:
        use registerDependency(String, EnhancedDefaultDependencyDescriptor) or registerPluginDependency(String EnhancedDefaultDependencyDescriptor)

    - #### public IvyDependencyManager createCopy(BuildSettings settings)

    - #### protected org.apache.ivy.core.module.id.ArtifactId createExcludeArtifactId(java.lang.String excludeName)

    - #### protected org.apache.ivy.core.module.id.ArtifactId createExcludeArtifactId(java.lang.String excludeName, java.lang.String group)

    - #### public org.apache.ivy.core.module.descriptor.ModuleDescriptor createModuleDescriptor()

    - #### public java.lang.String getApplicationName()

    - #### public java.lang.String getApplicationVersion()

    - #### public BuildSettings getBuildSettings()

    - #### public org.apache.ivy.plugins.resolver.ChainResolver getChainResolver()

    - #### public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getConfigurationMappings()

    - #### public java.lang.String[] getConfigurationNames()

    - #### public java.util.Set<org.apache.ivy.core.module.id.ModuleRevisionId> getDependencies()

      Obtains a list of dependencies defined in the project

    - #### public org.apache.ivy.core.settings.IvySettings getIvySettings()

    - #### public org.apache.ivy.util.MessageLogger getLogger()

    - #### public Metadata getMetadata()

    - #### public java.util.Set<java.lang.String> getMetadataRegisteredPluginNames()

    - #### public org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor getModuleDescriptor()

    - #### public org.apache.ivy.core.module.descriptor.DependencyDescriptor getPluginDependencyDescriptor(java.lang.String pluginName)

      Obtains a particular DependencyDescriptor by the plugin name

      Parameters:
        `pluginName` - The plugin name
      Returns:
        A DependencyDescriptor or null

    - #### public java.util.Set<org.apache.ivy.core.module.descriptor.DependencyDescriptor> getPluginDependencyDescriptors()

      Obtains a set of plugin dependency descriptors defined in the project

    - #### public java.util.Set<java.lang.String> getPluginDependencyNames()

      Obtains a set of plugins this application is dependent onb

      Returns:
        A set of plugins names

    - #### public java.util.Set<java.lang.String> getPluginExcludes(java.lang.String plugin)

    - #### public boolean getReadPom()

    - #### public org.apache.ivy.core.resolve.ResolveEngine getResolveEngine()

    - #### public java.util.Collection<java.lang.String> getUsedConfigurations()

    - #### public boolean hasApplicationDependencies()

      Returns true if the application has any dependencies that are not inherited from the framework or other plugins

    - #### protected void initializeModuleDescriptor()

    - #### public boolean isExcludedFromPlugin(java.lang.String plugin, java.lang.String dependencyName)

    - #### public boolean isExcludedFromPlugin(org.apache.ivy.core.module.descriptor.DependencyDescriptor currentPlugin, org.apache.ivy.core.module.id.ArtifactId dependency)

    - #### public boolean isLegacyResolve()

      Whether the legacy approach of parsing dependencies.groovy in addition to pom.xml should be used during dependency resolution

      Returns:
        True if it should

    - #### public boolean isOffline()

    - #### public boolean isPluginTransitive(java.lang.String pluginName)

      Returns whether a plugin is transitive, ie whether its dependencies are resolved transitively

      Parameters:
        `pluginName` - The name of the plugin
      Returns:
        true if the plugin is transitive

    - #### public boolean isPluginTransitivelyIncluded(java.lang.String pluginName)

      Whether the plugin is directly included or a transitive dependency of another plugin

      Parameters:
        `pluginName` - The plugin name
      Returns:
        true if is transitively included

    - #### public void parseDependencies(@java.lang.SuppressWarnings("rawtypes") groovy.lang.Closure definition)

      Parses the Ivy DSL definition

    - #### public void parseDependencies(java.lang.String pluginName, groovy.lang.Closure<?> definition)

      Parses dependencies of a plugin.

      Parameters:
        `pluginName` - the name of the plugin
        `definition` - the Ivy DSL definition

    - #### public void parseDependencies(java.lang.String pluginName, groovy.lang.Closure<?> definition, org.apache.ivy.core.module.descriptor.ExcludeRule[] excludeRules)

      Parses dependencies of a plugin.

      Parameters:
        `pluginName` - the name of the plugin
        `definition` - the Ivy DSL definition

    - #### public org.apache.ivy.core.module.descriptor.DependencyDescriptor[] readDependenciesFromPOM()

    - #### public void registerDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)

      Registers a JAR dependency with the dependency manager.

      See Also:
        registerPluginDependency(String, EnhancedDefaultDependencyDescriptor)

    - #### public void registerPluginDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)

      Registers a plugin dependency (as in Grails plugin).

      See Also:
        registerDependency(String, EnhancedDefaultDependencyDescriptor)

    - #### public void setApplicationName(java.lang.String applicationName)

    - #### public void setApplicationVersion(java.lang.String applicationVersion)

    - #### public void setChainResolver(org.apache.ivy.plugins.resolver.ChainResolver chainResolver)

    - #### public void setIncludeJavadoc(boolean includeJavadoc)

    - #### public void setIncludeSource(boolean includeSource)

    - #### public void setLegacyResolve(boolean legacyResolve)

    - #### public void setLogger(org.apache.ivy.util.MessageLogger logger)

    - #### public void setMetadataRegisteredPluginNames(java.util.Set<java.lang.String> metadataRegisteredPluginNames)

    - #### public void setModuleDescriptor(org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor moduleDescriptor)

    - #### public void setOffline(boolean offline)

    - #### public void setReadPom(boolean flag)

    - #### public void setResolveEngine(org.apache.ivy.core.resolve.ResolveEngine resolveEngine)

    - #### public void setUsedConfigurations(java.util.Collection<java.lang.String> usedConfigurations)