public class RepositoryResolver extends AbstractPatternsBasedResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED| Constructor and Description |
|---|
RepositoryResolver() |
| Modifier and Type | Method and Description |
|---|---|
DownloadReport |
download(Artifact[] artifacts,
DownloadOptions options)
Download artifacts with specified DownloadOptions.
|
void |
dumpSettings() |
protected boolean |
exist(java.lang.String path) |
protected ResolvedResource |
findResourceUsingPattern(ModuleRevisionId mrid,
java.lang.String pattern,
Artifact artifact,
ResourceMDParser rmdparser,
java.util.Date date) |
protected void |
findTokenValues(java.util.Collection names,
java.util.List patterns,
java.util.Map tokenValues,
java.lang.String token) |
protected long |
get(Resource resource,
java.io.File dest) |
protected java.lang.String |
getDestination(java.lang.String pattern,
Artifact artifact,
ModuleRevisionId mrid) |
Repository |
getRepository() |
protected Resource |
getResource(java.lang.String source) |
java.lang.String |
getTypeName() |
boolean |
isAlwaysCheckExactRevision() |
protected ResolvedResource[] |
listResources(Repository repository,
ModuleRevisionId mrid,
java.lang.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 java.lang.String[] |
listTokenValues(java.lang.String pattern,
java.lang.String token) |
void |
publish(Artifact artifact,
java.io.File src,
boolean overwrite) |
protected void |
put(Artifact artifact,
java.io.File src,
java.lang.String dest,
boolean overwrite) |
protected void |
putChecksum(Artifact artifact,
java.io.File src,
java.lang.String dest,
boolean overwrite,
java.lang.String algorithm) |
protected void |
putSignature(Artifact artifact,
java.io.File src,
java.lang.String dest,
boolean overwrite) |
void |
setAlwaysCheckExactRevision(boolean alwaysCheckExactRevision) |
void |
setName(java.lang.String name)
Should only be used by configurator
|
void |
setRepository(Repository repository) |
void |
setSettings(ResolverSettings settings) |
void |
setSigner(java.lang.String signerName) |
addArtifactPattern, addConfiguredArtifact, addConfiguredIvy, addIvyPattern, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2ResourceSearchIdToNormal, convertM2TokenValuesForResourceSearch, findArtifactNames, findArtifactRef, findIvyFileRef, findIvyNames, findNames, findResource, findResourceUsingPatterns, getArtifactPatterns, getIvyPatterns, getModuleDescriptorExtension, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns, setM2compatibleacceptLatest, 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, toStringabortPublishTransaction, beginPublishTransaction, checkInterrupted, checkLatest, commitPublishTransaction, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setNamespace, setRepositoryCacheManager, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validatepublic Repository getRepository()
public void setRepository(Repository repository)
public void setName(java.lang.String name)
DependencyResolversetName in interface DependencyResolversetName in class AbstractResolvername - the new name of the resolverpublic void setSigner(java.lang.String signerName)
protected ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, java.lang.String pattern, Artifact artifact, ResourceMDParser rmdparser, java.util.Date date)
findResourceUsingPattern in class AbstractPatternsBasedResolverprotected Resource getResource(java.lang.String source) throws java.io.IOException
getResource in class BasicResolverjava.io.IOExceptionprotected ResolvedResource[] listResources(Repository repository, ModuleRevisionId mrid, java.lang.String pattern, Artifact artifact)
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 findprotected long get(Resource resource, java.io.File dest) throws java.io.IOException
get in class BasicResolverjava.io.IOExceptionpublic void publish(Artifact artifact, java.io.File src, boolean overwrite) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getDestination(java.lang.String pattern,
Artifact artifact,
ModuleRevisionId mrid)
protected void put(Artifact artifact, java.io.File src, java.lang.String dest, boolean overwrite) throws java.io.IOException
java.io.IOExceptionprotected void putChecksum(Artifact artifact, java.io.File src, java.lang.String dest, boolean overwrite, java.lang.String algorithm) throws java.io.IOException
java.io.IOExceptionprotected void putSignature(Artifact artifact, java.io.File src, java.lang.String dest, boolean overwrite) throws java.io.IOException
java.io.IOExceptionpublic DownloadReport download(Artifact[] artifacts, DownloadOptions options)
DependencyResolverThe 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 an
ArtifactDownloadReport for each requested Artifact.
download in interface DependencyResolverdownload in class BasicResolverartifacts - an array of artifacts to download. Must not be null.options - options to apply for this download. Must not be null.protected void findTokenValues(java.util.Collection names,
java.util.List patterns,
java.util.Map tokenValues,
java.lang.String token)
findTokenValues in class AbstractPatternsBasedResolverprotected java.lang.String[] listTokenValues(java.lang.String pattern,
java.lang.String token)
listTokenValues in class AbstractPatternsBasedResolverprotected boolean exist(java.lang.String path)
exist in class AbstractPatternsBasedResolverpublic java.lang.String getTypeName()
getTypeName in class AbstractResolverpublic void dumpSettings()
dumpSettings in interface DependencyResolverdumpSettings in class AbstractPatternsBasedResolverpublic void setSettings(ResolverSettings settings)
setSettings in interface DependencyResolversetSettings in class AbstractResolverpublic boolean isAlwaysCheckExactRevision()
public void setAlwaysCheckExactRevision(boolean alwaysCheckExactRevision)