public interface DependencyResolver
Modifier and Type | Method and Description |
---|---|
void |
abortPublishTransaction() |
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)
Download an artifact according to the given DownloadOptions.
|
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.
|
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.
|
java.lang.String |
getName() |
Namespace |
getNamespace()
Returns the namespace associated with this resolver.
|
RepositoryCacheManager |
getRepositoryCacheManager()
Returns the
RepositoryCacheManager used to manage the repository cache associated
with this dependency resolver. |
ModuleEntry[] |
listModules(OrganisationEntry org) |
OrganisationEntry[] |
listOrganisations() |
RevisionEntry[] |
listRevisions(ModuleEntry module) |
java.util.Map[] |
listTokenValues(java.lang.String[] tokens,
java.util.Map criteria)
Same as
listTokenValues(String, Map) but more generic. |
java.lang.String[] |
listTokenValues(java.lang.String token,
java.util.Map otherTokenValues)
List all the values the given token can take if other tokens are set as described in the
otherTokenValues map.
|
ArtifactOrigin |
locate(Artifact artifact)
Locates the given artifact and returns its location if it can be located by this resolver and
if it actually exists, or
null in other cases. |
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 |
setName(java.lang.String name)
Should only be used by configurator
|
void |
setSettings(ResolverSettings settings) |
java.lang.String getName()
void setName(java.lang.String name)
name
- the new name of the resolverResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws java.text.ParseException
java.text.ParseException
ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data)
dd
- the dependency descriptordata
- the resolve dataDownloadReport download(Artifact[] artifacts, DownloadOptions options)
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 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
.ArtifactDownloadReport download(ArtifactOrigin artifact, DownloadOptions options)
This methods is an alternative to download(Artifact[], DownloadOptions)
, which
locates and downloads a set of artifacts. This method uses an ArtifactOrigin
, and as
such is only used to materialize an already located Artifact.
artifact
- the location of the artifact to download. Must not be null
.options
- options to apply for this download. Must not be null
.null
.boolean exists(Artifact artifact)
true
if the given artifact can be located by this resolver and actually
exist.artifact
- the artifact which should be tested.true
if the given artifact can be located by this resolver and actually
exist.ArtifactOrigin locate(Artifact artifact)
null
in other cases.artifact
- the artifact which should be locatednull
if it can't be located by this resolver
or doesn't exist.void publish(Artifact artifact, java.io.File src, boolean overwrite) throws java.io.IOException
java.io.IOException
void beginPublishTransaction(ModuleRevisionId module, boolean overwrite) throws java.io.IOException
java.io.IOException
void abortPublishTransaction() throws java.io.IOException
java.io.IOException
void commitPublishTransaction() throws java.io.IOException
java.io.IOException
void reportFailure()
void reportFailure(Artifact art)
art
- java.lang.String[] listTokenValues(java.lang.String token, java.util.Map otherTokenValues)
Note that listing does not take into account namespaces, and return raw information without
any namespace transformation. The caller is responsible for calling namespace transformation
with the Namespace returned by getNamespace()
.
java.util.Map[] listTokenValues(java.lang.String[] tokens, java.util.Map criteria)
listTokenValues(String, Map)
but more generic.tokens
- the tokens of the querycriteria
- the token which have valuesnull
OrganisationEntry[] listOrganisations()
ModuleEntry[] listModules(OrganisationEntry org)
RevisionEntry[] listRevisions(ModuleEntry module)
Namespace getNamespace()
void dumpSettings()
void setSettings(ResolverSettings settings)
RepositoryCacheManager getRepositoryCacheManager()
RepositoryCacheManager
used to manage the repository cache associated
with this dependency resolver.RepositoryCacheManager
used to manage the repository cache associated
with this dependency resolver.