|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
org.apache.ivy.plugins.resolver.RepositoryResolver
org.apache.ivy.plugins.resolver.URLResolver
org.apache.ivy.plugins.resolver.IvyRepResolver
public class IvyRepResolver
IvyRepResolver is a resolver which can be used to resolve dependencies found in the ivy official
repository for ivy files and ibiblio maven repository for the artifacts, or similar repositories.
For more flexibility with url and patterns, see
URLResolver
.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_IVYPATTERN
|
static java.lang.String |
DEFAULT_IVYROOT
|
Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver |
---|
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED |
Constructor Summary | |
---|---|
IvyRepResolver()
|
Method Summary | |
---|---|
DownloadReport |
download(Artifact[] artifacts,
DownloadOptions options)
Download artifacts with specified DownloadOptions. |
boolean |
exists(Artifact artifact)
Returns true if the given artifact can be located by this resolver and
actually exist. |
protected ResolvedResource |
findArtifactRef(Artifact artifact,
java.util.Date date)
|
java.util.List |
getArtifactPatterns()
|
java.lang.String |
getArtpattern()
|
java.lang.String |
getArtroot()
|
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 uniquelely the revision of the module outside of the current environment, then the resolved revision must begin by ##) |
java.lang.String |
getIvypattern()
|
java.util.List |
getIvyPatterns()
|
java.lang.String |
getIvyroot()
|
java.lang.String |
getTypeName()
|
ModuleEntry[] |
listModules(OrganisationEntry org)
|
OrganisationEntry[] |
listOrganisations()
|
RevisionEntry[] |
listRevisions(ModuleEntry mod)
|
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)
|
void |
setArtpattern(java.lang.String pattern)
|
void |
setArtroot(java.lang.String root)
|
void |
setIvypattern(java.lang.String pattern)
|
void |
setIvyroot(java.lang.String root)
Sets the root of the maven like repository. |
void |
setM2compatible(boolean m2compatible)
|
Methods inherited from class org.apache.ivy.plugins.resolver.RepositoryResolver |
---|
dumpSettings, exist, findResourceUsingPattern, findTokenValues, get, getDestination, getRepository, getResource, isAlwaysCheckExactRevision, listResources, listTokenValues, publish, put, putChecksum, setAlwaysCheckExactRevision, setName, setRepository, setSettings |
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver |
---|
addArtifactPattern, addConfiguredArtifact, addConfiguredIvy, addIvyPattern, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2TokenValuesForResourceSearch, filterNames, findArtifactNames, findIvyFileRef, findIvyNames, findNames, findResource, findResourceUsingPatterns, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns |
Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver |
---|
acceptLatest, clearArtifactAttempts, clearIvyAttempts, download, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getPublicationDate, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, listTokenValues, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_IVYPATTERN
public static final java.lang.String DEFAULT_IVYROOT
Constructor Detail |
---|
public IvyRepResolver()
Method Detail |
---|
public java.lang.String getIvypattern()
public void setIvypattern(java.lang.String pattern)
public java.lang.String getIvyroot()
public void setIvyroot(java.lang.String root)
root
- the root of the maven like repository
java.lang.IllegalArgumentException
- if root does not start with "http://"public void setM2compatible(boolean m2compatible)
setM2compatible
in class AbstractPatternsBasedResolver
public void publish(Artifact artifact, java.io.File src)
public java.lang.String getArtroot()
public java.lang.String getArtpattern()
public void setArtpattern(java.lang.String pattern)
public void setArtroot(java.lang.String root)
public OrganisationEntry[] listOrganisations()
listOrganisations
in interface DependencyResolver
listOrganisations
in class BasicResolver
public ModuleEntry[] listModules(OrganisationEntry org)
listModules
in interface DependencyResolver
listModules
in class BasicResolver
public RevisionEntry[] listRevisions(ModuleEntry mod)
listRevisions
in interface DependencyResolver
listRevisions
in class BasicResolver
public java.lang.String getTypeName()
getTypeName
in class URLResolver
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws java.text.ParseException
DependencyResolver
getDependency
in interface DependencyResolver
getDependency
in class BasicResolver
java.text.ParseException
protected ResolvedResource findArtifactRef(Artifact artifact, java.util.Date date)
findArtifactRef
in class AbstractPatternsBasedResolver
public DownloadReport download(Artifact[] artifacts, DownloadOptions options)
DependencyResolver
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.
download
in interface DependencyResolver
download
in class RepositoryResolver
artifacts
- an array of artifacts to download. Must not be null
.options
- options to apply for this download. Must not be null
.
public boolean exists(Artifact artifact)
DependencyResolver
true
if the given artifact can be located by this resolver and
actually exist.
exists
in interface DependencyResolver
exists
in class BasicResolver
artifact
- 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)
AbstractResolver
locate
in interface DependencyResolver
locate
in class BasicResolver
artifact
- the artifact which should be located
null
if it can't be located by this resolver
or doesn't exist.public java.util.List getIvyPatterns()
getIvyPatterns
in class AbstractPatternsBasedResolver
public java.util.List getArtifactPatterns()
getArtifactPatterns
in class AbstractPatternsBasedResolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |