org.apache.ivy.plugins.resolver

Class DualResolver

public class DualResolver extends AbstractResolver

DualResolver is used to resolve dependencies with one dependency revolver, called ivy resolver, and then download artifacts found in the resolved dependencies from a second dependency resolver, called artifact resolver. It is especially useful with resolvers using repository where there is a lot of artifact, but no ivy file, like the maven ibiblio repository. If no ivy file is found by the ivy resolver, the artifact resolver is used to check if there is artifact corresponding to the request (with default ivy file). For artifact download, however, only the artifact resolver is used. Exactly two resolvers should be added to this resolver for it to work properly. The first resolver added if the ivy resolver, the second is the artifact one.
Field Summary
static StringDESCRIPTOR_OPTIONAL
static StringDESCRIPTOR_REQUIRED
Method Summary
voidabortPublishTransaction()
voidadd(DependencyResolver resolver)
voidbeginPublishTransaction(ModuleRevisionId module, boolean overwrite)
voidcommitPublishTransaction()
DownloadReportdownload(Artifact[] artifacts, DownloadOptions options)
ArtifactDownloadReportdownload(ArtifactOrigin artifact, DownloadOptions options)
voiddumpSettings()
booleanexists(Artifact artifact)
ResolvedResourcefindIvyFileRef(DependencyDescriptor dd, ResolveData data)
DependencyResolvergetArtifactResolver()
ResolvedModuleRevisiongetDependency(DependencyDescriptor dd, ResolveData data)
DependencyResolvergetIvyResolver()
booleanisAllownomd()
ArtifactOriginlocate(Artifact artifact)
voidpublish(Artifact artifact, File src, boolean overwrite)
voidreportFailure()
voidreportFailure(Artifact art)
voidsetAllownomd(boolean allownomd)
voidsetArtifactResolver(DependencyResolver artifactResolver)
voidsetDescriptor(String descriptorRule)
Sets the module descriptor presence rule.
voidsetIvyResolver(DependencyResolver ivyResolver)

Field Detail

DESCRIPTOR_OPTIONAL

public static final String DESCRIPTOR_OPTIONAL

DESCRIPTOR_REQUIRED

public static final String DESCRIPTOR_REQUIRED

Method Detail

abortPublishTransaction

public void abortPublishTransaction()

add

public void add(DependencyResolver resolver)

beginPublishTransaction

public void beginPublishTransaction(ModuleRevisionId module, boolean overwrite)

commitPublishTransaction

public void commitPublishTransaction()

download

public DownloadReport download(Artifact[] artifacts, DownloadOptions options)

download

public ArtifactDownloadReport download(ArtifactOrigin artifact, DownloadOptions options)

dumpSettings

public void dumpSettings()

exists

public boolean exists(Artifact artifact)

findIvyFileRef

public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data)

getArtifactResolver

public DependencyResolver getArtifactResolver()

getDependency

public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)

getIvyResolver

public DependencyResolver getIvyResolver()

isAllownomd

public boolean isAllownomd()

locate

public ArtifactOrigin locate(Artifact artifact)

publish

public void publish(Artifact artifact, File src, boolean overwrite)

reportFailure

public void reportFailure()

reportFailure

public void reportFailure(Artifact art)

setAllownomd

public void setAllownomd(boolean allownomd)

setArtifactResolver

public void setArtifactResolver(DependencyResolver artifactResolver)

setDescriptor

public void setDescriptor(String descriptorRule)
Sets the module descriptor presence rule. Should be one of DESCRIPTOR_REQUIRED or DESCRIPTOR_OPTIONAL.

Parameters: descriptorRule the descriptor rule to use with this resolver.

setIvyResolver

public void setIvyResolver(DependencyResolver ivyResolver)