Groovy Documentation

org.codehaus.groovy.grails.resolve
[Java] Class AbstractIvyDependencyManager

java.lang.Object
  org.codehaus.groovy.grails.resolve.AbstractIvyDependencyManager

public abstract class AbstractIvyDependencyManager
extends java.lang.Object

Base class for IvyDependencyManager with some logic implemented in Java.

Authors:
Graeme Rocher
Since:
1.3


Field Summary
static java.util.List 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 dependencies

protected java.util.Set 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 metadataRegisteredPluginNames

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

protected java.util.Set modules

protected java.util.Map orgToDepMap

protected java.util.Set pluginDependencyDescriptors

protected java.util.Map pluginNameToDescriptorMap

protected boolean readPom

protected java.util.Collection usedConfigurations

 
Constructor Summary
AbstractIvyDependencyManager(org.apache.ivy.core.settings.IvySettings ivySettings, BuildSettings buildSettings, Metadata metadata)

 
Method Summary
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 getConfigurationMappings()

java.lang.String[] getConfigurationNames()

java.util.Set getDependencies()

org.apache.ivy.core.settings.IvySettings getIvySettings()

org.apache.ivy.util.MessageLogger getLogger()

Metadata getMetadata()

java.util.Set 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 getPluginDependencyDescriptors()

Obtains a set of plugin dependency descriptors defined in the project

java.util.Set getPluginDependencyNames()

Obtains a set of plugins this application is dependent onb

java.util.Set getPluginExcludes(java.lang.String plugin)

boolean getReadPom()

org.apache.ivy.core.resolve.ResolveEngine getResolveEngine()

java.util.Collection getUsedConfigurations()

boolean hasApplicationDependencies()

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

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 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 usedConfigurations)

 
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

ALL_CONFIGURATIONS

public static java.util.List ALL_CONFIGURATIONS


BUILD_CONFIGURATION

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


COMPILE_CONFIGURATION

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


DOCS_CONFIGURATION

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


NO_EXCLUDE_RULES

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


PROVIDED_CONFIGURATION

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


RUNTIME_CONFIGURATION

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


SNAPSHOT_CHANGING_PATTERN

public static final java.lang.String SNAPSHOT_CHANGING_PATTERN


TEST_CONFIGURATION

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


applicationName

protected java.lang.String applicationName


applicationVersion

protected java.lang.String applicationVersion


buildSettings

protected final BuildSettings buildSettings


configurationNames

protected java.lang.String[] configurationNames


dependencies

protected java.util.Set dependencies


dependencyDescriptors

protected java.util.Set dependencyDescriptors


hasApplicationDependencies

protected boolean hasApplicationDependencies


includeJavadoc

protected boolean includeJavadoc


includeSource

protected boolean includeSource


ivySettings

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


legacyResolve

protected boolean legacyResolve


metadata

protected final Metadata metadata


metadataRegisteredPluginNames

protected java.util.Set metadataRegisteredPluginNames


moduleDescriptor

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


modules

protected java.util.Set modules


orgToDepMap

protected java.util.Map orgToDepMap


pluginDependencyDescriptors

protected java.util.Set pluginDependencyDescriptors


pluginNameToDescriptorMap

protected java.util.Map pluginNameToDescriptorMap


readPom

protected boolean readPom


usedConfigurations

protected java.util.Collection usedConfigurations


 
Constructor Detail

AbstractIvyDependencyManager

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


 
Method Detail

configureDependencyDescriptor

@java.lang.Deprecated}
public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope)
deprecated:
use registerDependency(String, EnhancedDefaultDependencyDescriptor)


configureDependencyDescriptor

@java.lang.DeprecatedregisterPluginDependency(scope, dependencyDescriptor);
public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, java.lang.String scope, boolean pluginMode)
deprecated:
use registerDependency(String, EnhancedDefaultDependencyDescriptor) or registerPluginDependency(String EnhancedDefaultDependencyDescriptor)


createCopy

public IvyDependencyManager createCopy(BuildSettings settings)


createExcludeArtifactId

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


createExcludeArtifactId

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


createModuleDescriptor

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


getApplicationName

public java.lang.String getApplicationName()


getApplicationVersion

public java.lang.String getApplicationVersion()


getBuildSettings

public BuildSettings getBuildSettings()


getChainResolver

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


getConfigurationMappings

public java.util.Map getConfigurationMappings()


getConfigurationNames

public java.lang.String[] getConfigurationNames()


getDependencies

public java.util.Set getDependencies()


getIvySettings

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


getLogger

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


getMetadata

public Metadata getMetadata()


getMetadataRegisteredPluginNames

public java.util.Set getMetadataRegisteredPluginNames()


getModuleDescriptor

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


getPluginDependencyDescriptor

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


getPluginDependencyDescriptors

public java.util.Set getPluginDependencyDescriptors()
Obtains a set of plugin dependency descriptors defined in the project


getPluginDependencyNames

public java.util.Set getPluginDependencyNames()
Obtains a set of plugins this application is dependent onb
Returns:
A set of plugins names


getPluginExcludes

public java.util.Set getPluginExcludes(java.lang.String plugin)


getReadPom

public boolean getReadPom()


getResolveEngine

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


getUsedConfigurations

public java.util.Collection getUsedConfigurations()


hasApplicationDependencies

public boolean hasApplicationDependencies()
Returns true if the application has any dependencies that are not inherited from the framework or other plugins


isExcludedFromPlugin

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


isExcludedFromPlugin

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


isLegacyResolve

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


isOffline

public boolean isOffline()


isPluginTransitive

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


isPluginTransitivelyIncluded

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


parseDependencies

public void parseDependencies(@java.lang.SuppressWarnings groovy.lang.Closure definition)
Parses the Ivy DSL definition


parseDependencies

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


parseDependencies

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


readDependenciesFromPOM

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


registerDependency

public void registerDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)
Registers a JAR dependency with the dependency manager.
See Also:
registerPluginDependency(String, EnhancedDefaultDependencyDescriptor)


registerPluginDependency

public void registerPluginDependency(java.lang.String scope, EnhancedDefaultDependencyDescriptor descriptor)
Registers a plugin dependency (as in Grails plugin).
See Also:
registerDependency(String, EnhancedDefaultDependencyDescriptor)


setApplicationName

public void setApplicationName(java.lang.String applicationName)


setApplicationVersion

public void setApplicationVersion(java.lang.String applicationVersion)


setChainResolver

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


setIncludeJavadoc

public void setIncludeJavadoc(boolean includeJavadoc)


setIncludeSource

public void setIncludeSource(boolean includeSource)


setLegacyResolve

public void setLegacyResolve(boolean legacyResolve)


setLogger

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


setMetadataRegisteredPluginNames

public void setMetadataRegisteredPluginNames(java.util.Set metadataRegisteredPluginNames)


setModuleDescriptor

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


setOffline

public void setOffline(boolean offline)


setReadPom

public void setReadPom(boolean flag)


setResolveEngine

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


setUsedConfigurations

public void setUsedConfigurations(java.util.Collection usedConfigurations)


 

Groovy Documentation