org.apache.ivy.core.settings
Class IvySettings
public
class
IvySettings
extends Object
implements SortEngineSettings, PublishEngineSettings, ParserSettings, DeliverEngineSettings, CheckEngineSettings, InstallEngineSettings, ResolverSettings, ResolveEngineSettings, RetrieveEngineSettings, RepositoryManagementEngineSettings
Method Summary |
void | addAllVariables(Map variables) |
void | addAllVariables(Map variables, boolean overwrite) |
void | addClasspathURL(URL url) |
void | addConfigured(DependencyResolver resolver) |
void | addConfigured(ModuleDescriptorParser parser) |
void | addConfigured(ConflictManager cm) |
void | addConfigured(LatestStrategy latest) |
void | addConfigured(LockStrategy lockStrategy) |
void | addConfigured(Namespace ns) |
void | addConfigured(PatternMatcher m) |
void | addConfigured(RepositoryCacheManager c) |
void | addConfigured(ReportOutputter outputter) |
void | addConfigured(VersionMatcher vmatcher) |
void | addConfigured(CircularDependencyStrategy strategy) |
void | addConfigured(Trigger trigger) |
void | addConflictManager(String name, ConflictManager cm) |
void | addLatestStrategy(String name, LatestStrategy latest) |
void | addLockStrategy(String name, LockStrategy lockStrategy) |
void | addMatcher(PatternMatcher m) |
void | addModuleConfiguration(Map attributes, PatternMatcher matcher, String resolverName, String branch, String conflictManager, String resolveMode)
regular expressions as explained in Pattern class may be used in attributes |
void | addNamespace(Namespace ns) |
void | addReportOutputter(ReportOutputter outputter) |
void | addRepositoryCacheManager(RepositoryCacheManager c) |
void | addResolver(DependencyResolver resolver) |
void | addTrigger(Trigger trigger) |
void | addVersionMatcher(VersionMatcher vmatcher) |
void | configureDefaultVersionMatcher() |
void | configureRepositories(boolean remote)
Call this method to ask ivy to configure some variables using either a remote or a local
properties file |
boolean | debugConflictResolution() |
boolean | debugLocking() |
void | defaultInit()
Default initialization of settings, useful when you don't want to load your settings from a
settings file or URL, but prefer to set them manually. |
boolean | doValidate() |
boolean | dumpMemoryUsage() |
void | filterIgnore(Collection names)
Filters the names list by removing all names that should be ignored as defined by the listing
ignore list
|
File | getBaseDir() |
CircularDependencyStrategy | getCircularDependencyStrategy() |
CircularDependencyStrategy | getCircularDependencyStrategy(String name) |
ConflictManager | getConflictManager(ModuleId moduleId) |
ConflictManager | getConflictManager(String name) |
static URL | getDefault14SettingsURL() |
String | getDefaultBranch(ModuleId moduleId) |
String | getDefaultBranch() |
File | getDefaultCache() |
String | getDefaultCacheArtifactPattern() |
String | getDefaultCacheIvyPattern() |
ConflictManager | getDefaultConflictManager() |
File | getDefaultIvyUserDir() |
LatestStrategy | getDefaultLatestStrategy() |
LockStrategy | getDefaultLockStrategy() |
static URL | getDefaultPropertiesURL() |
File | getDefaultRepositoryCacheBasedir() |
RepositoryCacheManager | getDefaultRepositoryCacheManager() |
File | getDefaultResolutionCacheBasedir() |
String | getDefaultResolveMode() |
DependencyResolver | getDefaultResolver() |
static URL | getDefaultSettingsURL() |
String[] | getIgnorableFilenames()
Returns the file names of the files that should be ignored when
creating a file listing. |
long | getInterruptTimeout() |
LatestStrategy | getLatestStrategy(String name) |
LockStrategy | getLockStrategy(String name) |
PatternMatcher | getMatcher(String name) |
Collection | getMatcherNames() |
Namespace | getNamespace(String name) |
RelativeUrlResolver | getRelativeUrlResolver() |
ReportOutputter | getReportOutputter(String name) |
ReportOutputter[] | getReportOutputters() |
RepositoryCacheManager | getRepositoryCacheManager(String name) |
RepositoryCacheManager[] | getRepositoryCacheManagers() |
ResolutionCacheManager | getResolutionCacheManager() |
String | getResolveMode(ModuleId moduleId) |
DependencyResolver | getResolver(ModuleRevisionId mrid) |
DependencyResolver | getResolver(String resolverName) |
String | getResolverName(ModuleRevisionId mrid) |
Collection | getResolverNames() |
Collection | getResolvers() |
StatusManager | getStatusManager() |
Namespace | getSystemNamespace() |
List | getTriggers() |
Class | getTypeDef(String name) |
Map | getTypeDefs() |
String | getVariable(String name) |
IvyVariableContainer | getVariableContainer() |
IvyVariableContainer | getVariables()
Returns the variables loaded in configuration file. |
VersionMatcher | getVersionMatcher(String name) |
VersionMatcher | getVersionMatcher() |
VersionMatcher[] | getVersionMatchers() |
boolean | isCheckUpToDate() |
boolean | isDefaultUseOrigin() |
boolean | isUseRemoteConfig() |
void | load(File settingsFile) |
void | load(URL settingsURL) |
void | loadDefault() |
void | loadDefault14() |
void | loadProperties(URL url) |
void | loadProperties(URL url, boolean overwrite) |
void | loadProperties(File file) |
void | loadProperties(File file, boolean overwrite) |
boolean | logModulesInUse() |
boolean | logModuleWhenFound() |
boolean | logNotConvertedExclusionRule() |
boolean | logResolvedRevision() |
File | resolveFile(String fileName)
Return the canonical form of a filename.
|
void | setBaseDir(File baseDir) |
void | setCheckUpToDate(boolean checkUpToDate) |
void | setCircularDependencyStrategy(CircularDependencyStrategy strategy) |
void | setDefaultBranch(String defaultBranch) |
void | setDefaultCache(File cacheDirectory) |
void | setDefaultCacheArtifactPattern(String defaultCacheArtifactPattern) |
void | setDefaultCacheIvyPattern(String defaultCacheIvyPattern) |
void | setDefaultConflictManager(ConflictManager defaultConflictManager) |
void | setDefaultIvyUserDir(File defaultUserDir) |
void | setDefaultLatestStrategy(LatestStrategy defaultLatestStrategy) |
void | setDefaultLockStrategy(LockStrategy defaultLockStrategy) |
void | setDefaultRepositoryCacheBasedir(String repositoryCacheRoot) |
void | setDefaultRepositoryCacheManager(RepositoryCacheManager cache) |
void | setDefaultResolutionCacheBasedir(String resolutionCacheRoot) |
void | setDefaultResolveMode(String defaultResolveMode) |
void | setDefaultResolver(String resolverName) |
void | setDefaultUseOrigin(boolean useOrigin) |
void | setDictatorResolver(DependencyResolver resolver) |
void | setLogNotConvertedExclusionRule(boolean logNotConvertedExclusionRule) |
void | setResolutionCacheManager(ResolutionCacheManager resolutionCacheManager) |
void | setSettingsVariables(File settingsFile) |
void | setSettingsVariables(URL settingsURL) |
void | setStatusManager(StatusManager statusManager) |
void | setUseRemoteConfig(boolean useRemoteConfig) |
void | setValidate(boolean validate) |
void | setVariable(String varName, String value) |
void | setVariable(String varName, String value, boolean overwrite) |
void | setVariableContainer(IvyVariableContainer variables)
Use a different variable container.
|
String | substitute(String str)
Substitute variables in the given string by their value found in the current set of variables
|
Map | substitute(Map strings)
Substitute variables in the given map values by their value found in the current set of
variables
|
Class | typeDef(String name, String className) |
Class | typeDef(String name, String className, boolean silentFail) |
void | typeDefs(InputStream stream) |
void | typeDefs(InputStream stream, boolean silentFail) |
void | typeDefs(Properties p) |
void | typeDefs(Properties p, boolean silentFail) |
void | useDeprecatedUseOrigin() |
void | validate()
Validates the settings, throwing an IllegalStateException if the current state is not
valid.
|
public IvySettings()
public void addAllVariables(Map variables)
public void addAllVariables(Map variables, boolean overwrite)
public void addClasspathURL(URL url)
public void addConfigured(
Trigger trigger)
public void addLockStrategy(String name,
LockStrategy lockStrategy)
public void addModuleConfiguration(Map attributes,
PatternMatcher matcher, String resolverName, String branch, String conflictManager, String resolveMode)
regular expressions as explained in Pattern class may be used in attributes
public void addTrigger(
Trigger trigger)
public void configureDefaultVersionMatcher()
public void configureRepositories(boolean remote)
Call this method to ask ivy to configure some variables using either a remote or a local
properties file
public boolean debugConflictResolution()
public final boolean debugLocking()
public void defaultInit()
Default initialization of settings, useful when you don't want to load your settings from a
settings file or URL, but prefer to set them manually. By calling this method you will still
have the basic initialization done when loading settings.
Throws: IOException
public boolean doValidate()
public boolean dumpMemoryUsage()
public void filterIgnore(Collection names)
Filters the names list by removing all names that should be ignored as defined by the listing
ignore list
Parameters: names
public File getBaseDir()
public static URL getDefault14SettingsURL()
public String getDefaultBranch(
ModuleId moduleId)
public String getDefaultBranch()
public File getDefaultCache()
public String getDefaultCacheArtifactPattern()
public String getDefaultCacheIvyPattern()
public File getDefaultIvyUserDir()
public static URL getDefaultPropertiesURL()
public File getDefaultRepositoryCacheBasedir()
public File getDefaultResolutionCacheBasedir()
public String getDefaultResolveMode()
public static URL getDefaultSettingsURL()
public String[] getIgnorableFilenames()
Returns the file names of the files that should be ignored when
creating a file listing.
public long getInterruptTimeout()
public Collection getMatcherNames()
public String getResolveMode(
ModuleId moduleId)
public Collection getResolverNames()
public Collection getResolvers()
public List getTriggers()
public Class getTypeDef(String name)
public Map getTypeDefs()
public String getVariable(String name)
Returns the variables loaded in configuration file. Those variables may better be seen as ant
properties
Returns:
public boolean isCheckUpToDate()
public boolean isDefaultUseOrigin()
public boolean isUseRemoteConfig()
public void load(File settingsFile)
public void load(URL settingsURL)
public void loadDefault()
public void loadDefault14()
public void loadProperties(URL url)
public void loadProperties(URL url, boolean overwrite)
public void loadProperties(File file)
public void loadProperties(File file, boolean overwrite)
public boolean logModulesInUse()
public boolean logModuleWhenFound()
public boolean logNotConvertedExclusionRule()
public boolean logResolvedRevision()
public File resolveFile(String fileName)
Return the canonical form of a filename.
If the specified file name is relative it is resolved
with respect to the settings's base directory.
Parameters: fileName The name of the file to resolve.
Must not be null
.
Returns: the resolved File.
public void setBaseDir(File baseDir)
public void setCheckUpToDate(boolean checkUpToDate)
public void setDefaultBranch(String defaultBranch)
public void setDefaultCache(File cacheDirectory)
public void setDefaultCacheArtifactPattern(String defaultCacheArtifactPattern)
public void setDefaultCacheIvyPattern(String defaultCacheIvyPattern)
public void setDefaultConflictManager(
ConflictManager defaultConflictManager)
public void setDefaultIvyUserDir(File defaultUserDir)
public void setDefaultLatestStrategy(
LatestStrategy defaultLatestStrategy)
public void setDefaultLockStrategy(
LockStrategy defaultLockStrategy)
public void setDefaultRepositoryCacheBasedir(String repositoryCacheRoot)
public void setDefaultResolutionCacheBasedir(String resolutionCacheRoot)
public void setDefaultResolveMode(String defaultResolveMode)
public void setDefaultResolver(String resolverName)
public void setDefaultUseOrigin(boolean useOrigin)
public void setLogNotConvertedExclusionRule(boolean logNotConvertedExclusionRule)
public void setSettingsVariables(File settingsFile)
public void setSettingsVariables(URL settingsURL)
public void setUseRemoteConfig(boolean useRemoteConfig)
public void setValidate(boolean validate)
public void setVariable(String varName, String value)
public void setVariable(String varName, String value, boolean overwrite)
Use a different variable container.
Parameters: variables
public String substitute(String str)
Substitute variables in the given string by their value found in the current set of variables
Parameters: str
the string in which substitution should be made
Returns: the string where all current ivy variables have been substituted by their value
If the input str doesn't use any variable, the same object is returned
public Map substitute(Map strings)
Substitute variables in the given map values by their value found in the current set of
variables
Parameters: strings
the map of strings in which substitution should be made
Returns: a new map of strings in which all current ivy variables in values have been
substituted by their value
public Class typeDef(String name, String className)
public Class typeDef(String name, String className, boolean silentFail)
public void typeDefs(InputStream stream)
public void typeDefs(InputStream stream, boolean silentFail)
public void typeDefs(Properties p)
public void typeDefs(Properties p, boolean silentFail)
public void useDeprecatedUseOrigin()
public void validate()
Validates the settings, throwing an IllegalStateException if the current state is not
valid.
Throws: IllegalStateException
if the settings is not valid.