Class AbstractPatternsBasedResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
- All Implemented Interfaces:
Validatable, DependencyResolver, HasLatestStrategy
- Direct Known Subclasses:
RepositoryResolver
-
Field Summary
Fields inherited from class BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArtifactPattern(String pattern) voidvoidvoidaddIvyPattern(String pattern) example of pattern : ~/Workspace/[module]/[module].ivy.xmlprotected voidconvertM2CriteriaForResourceSearch(Map<String, Object> criteria) protected ModuleRevisionIdprotected Stringprotected ModuleRevisionIdprotected voidconvertM2TokenValuesForResourceSearch(Map<String, String> tokenValues) voidprotected abstract booleanprotected Collection<String> findArtifactNames(Map<String, String> tokenValues, String token) findArtifactRef(Artifact artifact, Date date) findIvyFileRef(DependencyDescriptor dd, ResolveData data) Finds the module descriptor for the specified DependencyDescriptor.protected Collection<String> findIvyNames(Map<String, String> tokenValues, String token) protected Collection<String> findResource(ResolvedResource[] rress, ResourceMDParser rmdparser, ModuleRevisionId mrid, Date date) When the resolver has many choices, this function helps choosing oneprotected abstract ResolvedResourcefindResourceUsingPattern(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) protected ResolvedResourcefindResourceUsingPatterns(ModuleRevisionId moduleRevision, List<String> patternList, Artifact artifact, ResourceMDParser rmdparser, Date date) protected voidfindTokenValues(Collection<String> names, List<String> patterns, Map<String, String> tokenValues, String token) protected StringbooleanlistTokenValues(String[] tokens, Map<String, Object> criteria) Same asDependencyResolver.listTokenValues(String, Map)but more generic.protected abstract String[]listTokenValues(String pattern, String token) protected voidsetArtifactPatterns(List<String> patterns) protected voidsetIvyPatterns(List<String> patterns) voidsetM2compatible(boolean compatible) Methods inherited from class BasicResolver
acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, download, exists, filterNames, findFirstArtifactRef, get, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getResource, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, listModules, listOrganisations, listRevisions, listTokenValues, locate, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toStringMethods inherited from class AbstractResolver
abortPublishTransaction, beginPublishTransaction, checkInterrupted, checkLatest, commitPublishTransaction, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, getTimeoutConstraint, getTypeName, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setName, setNamespace, setRepositoryCacheManager, setSettings, setTimeoutConstraint, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface DependencyResolver
publish
-
Constructor Details
-
AbstractPatternsBasedResolver
public AbstractPatternsBasedResolver()
-
-
Method Details
-
findIvyFileRef
Description copied from interface:DependencyResolverFinds the module descriptor for the specified DependencyDescriptor. If this resolver can't find the module descriptor, null is returned.- Parameters:
dd- the dependency descriptordata- the resolve data- Returns:
- the module descriptor, or null
-
findArtifactRef
- Specified by:
findArtifactRefin classBasicResolver
-
findResource
public ResolvedResource findResource(ResolvedResource[] rress, ResourceMDParser rmdparser, ModuleRevisionId mrid, Date date) Description copied from class:BasicResolverWhen the resolver has many choices, this function helps choosing one- Overrides:
findResourcein classBasicResolver- Parameters:
rress- the list of resolved resource which the resolver found to fit the requirementrmdparser- the parser of module descriptormrid- the module being resolveddate- the current date- Returns:
- the selected resource
-
findResourceUsingPatterns
protected ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevision, List<String> patternList, Artifact artifact, ResourceMDParser rmdparser, Date date) -
findResourceUsingPattern
protected abstract ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) -
findNames
- Specified by:
findNamesin classBasicResolver
-
findIvyNames
-
findArtifactNames
-
listTokenValues
Description copied from interface:DependencyResolverSame asDependencyResolver.listTokenValues(String, Map)but more generic.- Specified by:
listTokenValuesin interfaceDependencyResolver- Overrides:
listTokenValuesin classAbstractResolver- Parameters:
tokens- the tokens of the querycriteria- the token which have values- Returns:
- the list of token values, must not be
null
-
getModuleDescriptorExtension
-
listTokenValues
-
exist
-
findTokenValues
-
addIvyPattern
example of pattern : ~/Workspace/[module]/[module].ivy.xml- Parameters:
pattern- String
-
addArtifactPattern
-
getIvyPatterns
-
getArtifactPatterns
-
setIvyPatterns
-
setArtifactPatterns
-
addConfiguredIvy
-
addConfiguredArtifact
-
dumpSettings
public void dumpSettings()- Specified by:
dumpSettingsin interfaceDependencyResolver- Overrides:
dumpSettingsin classAbstractResolver
-
isM2compatible
public boolean isM2compatible() -
setM2compatible
public void setM2compatible(boolean compatible) -
convertM2ResourceSearchIdToNormal
-
convertM2IdForResourceSearch
-
convertM2OrganizationForResourceSearch
-
convertM2TokenValuesForResourceSearch
-
convertM2CriteriaForResourceSearch
-