public class DualResolver extends AbstractResolver
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DESCRIPTOR_OPTIONAL |
static java.lang.String |
DESCRIPTOR_REQUIRED |
| Constructor and Description |
|---|
DualResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortPublishTransaction() |
void |
add(DependencyResolver resolver) |
void |
beginPublishTransaction(ModuleRevisionId module,
boolean overwrite) |
void |
commitPublishTransaction() |
DownloadReport |
download(Artifact[] artifacts,
DownloadOptions options)
Download artifacts with specified DownloadOptions.
|
ArtifactDownloadReport |
download(ArtifactOrigin artifact,
DownloadOptions options)
Default implementation downloads the artifact without taking advantage of its location
|
void |
dumpSettings() |
boolean |
exists(Artifact artifact)
Returns
true if the given artifact can be located by this resolver and actually
exist. |
ResolvedResource |
findIvyFileRef(DependencyDescriptor dd,
ResolveData data)
Finds the module descriptor for the specified DependencyDescriptor.
|
DependencyResolver |
getArtifactResolver() |
ResolvedModuleRevision |
getDependency(DependencyDescriptor dd,
ResolveData data)
Resolve a module by id, getting its module descriptor and resolving the revision if it's a
latest one (i.e. a revision uniquely identifying the revision of a module in the current
environment - If this revision is not able to identify uniquely the revision of the module
outside of the current environment, then the resolved revision must begin by ##)
|
DependencyResolver |
getIvyResolver() |
boolean |
isAllownomd() |
ArtifactOrigin |
locate(Artifact artifact)
Default implementation actually download the artifact Subclasses should overwrite this to
avoid the download
|
void |
publish(Artifact artifact,
java.io.File src,
boolean overwrite) |
void |
reportFailure()
Reports last resolve failure as Messages
|
void |
reportFailure(Artifact art)
Reports last artifact download failure as Messages
|
void |
setAllownomd(boolean allownomd) |
void |
setArtifactResolver(DependencyResolver artifactResolver) |
void |
setDescriptor(java.lang.String descriptorRule)
Sets the module descriptor presence rule.
|
void |
setIvyResolver(DependencyResolver ivyResolver) |
checkInterrupted, checkLatest, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, getTypeName, hidePassword, isAfter, isValidate, listModules, listOrganisations, listRevisions, listTokenValues, listTokenValues, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setName, setNamespace, setRepositoryCacheManager, setSettings, setValidate, toString, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validatepublic static final java.lang.String DESCRIPTOR_OPTIONAL
public static final java.lang.String DESCRIPTOR_REQUIRED
public void add(DependencyResolver resolver)
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws java.text.ParseException
DependencyResolverjava.text.ParseExceptionpublic ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data)
DependencyResolverdd - the dependency descriptordata - the resolve datapublic void reportFailure()
DependencyResolverreportFailure in interface DependencyResolverreportFailure in class AbstractResolverpublic void reportFailure(Artifact art)
DependencyResolverreportFailure in interface DependencyResolverreportFailure in class AbstractResolverpublic 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.
artifacts - an array of artifacts to download. Must not be null.options - options to apply for this download. Must not be null.public DependencyResolver getArtifactResolver()
public void setArtifactResolver(DependencyResolver artifactResolver)
public DependencyResolver getIvyResolver()
public void setIvyResolver(DependencyResolver ivyResolver)
public void publish(Artifact artifact, java.io.File src, boolean overwrite) throws java.io.IOException
java.io.IOExceptionpublic void abortPublishTransaction()
throws java.io.IOException
abortPublishTransaction in interface DependencyResolverabortPublishTransaction in class AbstractResolverjava.io.IOExceptionpublic void beginPublishTransaction(ModuleRevisionId module, boolean overwrite) throws java.io.IOException
beginPublishTransaction in interface DependencyResolverbeginPublishTransaction in class AbstractResolverjava.io.IOExceptionpublic void commitPublishTransaction()
throws java.io.IOException
commitPublishTransaction in interface DependencyResolvercommitPublishTransaction in class AbstractResolverjava.io.IOExceptionpublic void dumpSettings()
dumpSettings in interface DependencyResolverdumpSettings in class AbstractResolverpublic boolean exists(Artifact artifact)
DependencyResolvertrue if the given artifact can be located by this resolver and actually
exist.exists in interface DependencyResolverexists in class AbstractResolverartifact - the artifact which should be tested.true if the given artifact can be located by this resolver and actually
exist.public ArtifactOrigin locate(Artifact artifact)
AbstractResolverlocate in interface DependencyResolverlocate in class AbstractResolverartifact - the artifact which should be locatednull if it can't be located by this resolver
or doesn't exist.public ArtifactDownloadReport download(ArtifactOrigin artifact, DownloadOptions options)
AbstractResolverdownload in interface DependencyResolverdownload in class AbstractResolverartifact - the location of the artifact to download. Must not be null.options - options to apply for this download. Must not be null.null.public boolean isAllownomd()
public void setAllownomd(boolean allownomd)
public void setDescriptor(java.lang.String descriptorRule)
DESCRIPTOR_REQUIRED or
DESCRIPTOR_OPTIONAL.descriptorRule - the descriptor rule to use with this resolver.