Package org.apache.ivy.plugins.resolver
Class RepositoryResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
org.apache.ivy.plugins.resolver.RepositoryResolver
- All Implemented Interfaces:
Validatable
,DependencyResolver
,HasLatestStrategy
- Direct Known Subclasses:
AbstractSshBasedResolver
,FileSystemResolver
,JarResolver
,MirroredURLResolver
,URLResolver
,VfsResolver
,VsftpResolver
-
Field Summary
Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownload
(Artifact[] artifacts, DownloadOptions options) Download artifacts with specified DownloadOptions.void
protected boolean
protected ResolvedResource
findResourceUsingPattern
(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) protected void
findTokenValues
(Collection<String> names, List<String> patterns, Map<String, String> tokenValues, String token) protected long
protected String
getDestination
(String pattern, Artifact artifact, ModuleRevisionId mrid) protected Resource
getResource
(String source) boolean
protected ResolvedResource[]
listResources
(Repository repository, ModuleRevisionId mrid, String pattern, Artifact artifact) List all revisions as resolved resources for the given artifact in the given repository using the given pattern, and using the given mrid except its revision.protected String[]
listTokenValues
(String pattern, String token) void
protected void
protected void
putChecksum
(Artifact artifact, File src, String dest, boolean overwrite, String algorithm) protected void
putSignature
(Artifact artifact, File src, String dest, boolean overwrite) void
setAlwaysCheckExactRevision
(boolean alwaysCheckExactRevision) void
Should only be used by configuratorvoid
setRepository
(Repository repository) void
setSettings
(ResolverSettings settings) void
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
addArtifactPattern, addConfiguredArtifact, addConfiguredIvy, addIvyPattern, convertM2CriteriaForResourceSearch, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2ResourceSearchIdToNormal, convertM2TokenValuesForResourceSearch, findArtifactNames, findArtifactRef, findIvyFileRef, findIvyNames, findNames, findResource, findResourceUsingPatterns, getArtifactPatterns, getIvyPatterns, getModuleDescriptorExtension, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns, setM2compatible
Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, exists, filterNames, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, 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, toString
Methods inherited from class org.apache.ivy.plugins.resolver.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, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setNamespace, setRepositoryCacheManager, setTimeoutConstraint, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validate
-
Constructor Details
-
RepositoryResolver
public RepositoryResolver()
-
-
Method Details
-
getRepository
-
setRepository
-
setName
Description copied from interface:DependencyResolver
Should only be used by configurator- Specified by:
setName
in interfaceDependencyResolver
- Overrides:
setName
in classAbstractResolver
- Parameters:
name
- the new name of the resolver
-
setSigner
-
findResourceUsingPattern
protected ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) - Specified by:
findResourceUsingPattern
in classAbstractPatternsBasedResolver
-
getResource
- Specified by:
getResource
in classBasicResolver
- Throws:
IOException
-
listResources
protected ResolvedResource[] listResources(Repository repository, ModuleRevisionId mrid, String pattern, Artifact artifact) List all revisions as resolved resources for the given artifact in the given repository using the given pattern, and using the given mrid except its revision.- Parameters:
repository
- the repository in which revisions should be locatedmrid
- the module revision id to look for (except revision)pattern
- the pattern to use to locate the revisionsartifact
- the artifact to find- Returns:
- an array of ResolvedResource, all pointing to a different revision of the given Artifact.
-
get
- Specified by:
get
in classBasicResolver
- Throws:
IOException
-
publish
- Throws:
IOException
-
getDestination
-
put
- Throws:
IOException
-
putChecksum
protected void putChecksum(Artifact artifact, File src, String dest, boolean overwrite, String algorithm) throws IOException - Throws:
IOException
-
putSignature
protected void putSignature(Artifact artifact, File src, String dest, boolean overwrite) throws IOException - Throws:
IOException
-
download
Description copied from interface:DependencyResolver
Download artifacts with specified DownloadOptions.The resolver will always make a best effort, and do not stop when an artifact is not available. It rather continue to attempt to download other requested artifacts, and report what has been done in the returned DownloadReport.
The returned DownloadReport is never
null
, and always contain anArtifactDownloadReport
for each requested Artifact.- Specified by:
download
in interfaceDependencyResolver
- Overrides:
download
in classBasicResolver
- Parameters:
artifacts
- an array of artifacts to download. Must not benull
.options
- options to apply for this download. Must not benull
.- Returns:
- a DownloadReport with details about each Artifact download.
-
findTokenValues
protected void findTokenValues(Collection<String> names, List<String> patterns, Map<String, String> tokenValues, String token) - Overrides:
findTokenValues
in classAbstractPatternsBasedResolver
-
listTokenValues
- Specified by:
listTokenValues
in classAbstractPatternsBasedResolver
-
exist
- Specified by:
exist
in classAbstractPatternsBasedResolver
-
getTypeName
- Overrides:
getTypeName
in classAbstractResolver
-
dumpSettings
public void dumpSettings()- Specified by:
dumpSettings
in interfaceDependencyResolver
- Overrides:
dumpSettings
in classAbstractPatternsBasedResolver
-
setSettings
- Specified by:
setSettings
in interfaceDependencyResolver
- Overrides:
setSettings
in classAbstractResolver
-
isAlwaysCheckExactRevision
public boolean isAlwaysCheckExactRevision() -
setAlwaysCheckExactRevision
public void setAlwaysCheckExactRevision(boolean alwaysCheckExactRevision)
-