org.apache.ivy.plugins.resolver

## Class IBiblioResolver

- java.lang.Object
- - org.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.IBiblioResolver

All Implemented Interfaces:
  Validatable, DependencyResolver, HasLatestStrategy

Direct Known Subclasses:
  BintrayResolver

    public class IBiblioResolver
    extends URLResolver

IBiblioResolver is a resolver which can be used to resolve dependencies found in the ibiblio maven repository, or similar repositories.

For more flexibility with url and patterns, see `URLResolver`.

### Field Summary

Fields
`static java.lang.String` `DEFAULT_M2_ROOT`
`static java.lang.String` `DEFAULT_PATTERN`
`static java.lang.String` `DEFAULT_ROOT`

### Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver

`DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED`

### Constructor Summary

Constructors
Constructor and Description
`IBiblioResolver()`

### Method Summary

Methods
`DownloadReport` `download(Artifact[] artifacts, DownloadOptions options)` Download artifacts with specified DownloadOptions.
`void` `dumpSettings()`
`void` `ensureConfigured(ResolverSettings settings)`
`boolean` `exists(Artifact artifact)` Returns `true` if the given artifact can be located by this resolver and actually exist.
`ResolvedResource` `findArtifactRef(Artifact artifact, java.util.Date date)`
`ResolvedResource` `findIvyFileRef(DependencyDescriptor dd, ResolveData data)` Finds the module descriptor for the specified `DependencyDescriptor`.
`protected void` `findTokenValues(java.util.Collection names, java.util.List patterns, java.util.Map tokenValues, java.lang.String token)`
`java.util.List` `getArtifactPatterns()`

`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 ##)

`protected java.lang.String` `getModuleDescriptorExtension()`
`java.lang.String` `getPattern()`
`java.lang.String` `getRoot()`
`java.lang.String` `getTypeName()`
`boolean` `isUseMavenMetadata()`
`boolean` `isUsepoms()`
`ModuleEntry[]` `listModules(OrganisationEntry org)`
`OrganisationEntry[]` `listOrganisations()`
`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.
`RevisionEntry[]` `listRevisions(ModuleEntry mod)`
`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.
`protected java.lang.String[]` `listTokenValues(java.lang.String pattern, java.lang.String token)`
`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` `setM2compatible(boolean m2compatible)`
`void` `setPattern(java.lang.String pattern)`
`void` `setRoot(java.lang.String root)` Sets the root of the maven like repository.
`void` `setUseMavenMetadata(boolean useMavenMetadata)`
`void` `setUsepoms(boolean usepoms)`

### Methods inherited from class org.apache.ivy.plugins.resolver.RepositoryResolver

`exist, findResourceUsingPattern, get, getDestination, getRepository, getResource, isAlwaysCheckExactRevision, publish, put, putChecksum, putSignature, setAlwaysCheckExactRevision, setName, setRepository, setSettings, setSigner`

### Methods inherited from class org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver

`addArtifactPattern, addConfiguredArtifact, addConfiguredIvy, addIvyPattern, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2ResourceSearchIdToNormal, convertM2TokenValuesForResourceSearch, findArtifactNames, findIvyNames, findNames, findResource, findResourceUsingPatterns, getIvyPatterns, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns`

### Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver

`acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, filterNames, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getPublicationDate, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toString`

### Methods inherited from class org.apache.ivy.plugins.resolver.AbstractResolver

`abortPublishTransaction, 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, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DEFAULT_PATTERN

    public static final java.lang.String DEFAULT_PATTERN

See Also:
  Constant Field Values

#### DEFAULT_ROOT

    public static final java.lang.String DEFAULT_ROOT

See Also:
  Constant Field Values

#### DEFAULT_M2_ROOT

    public static final java.lang.String DEFAULT_M2_ROOT

See Also:
  Constant Field Values

### Constructor Detail

#### IBiblioResolver

    public IBiblioResolver()

### Method Detail

#### findIvyFileRef

    public ResolvedResource findIvyFileRef(DependencyDescriptor dd,
                                  ResolveData data)

Description copied from interface: `DependencyResolver`
Finds the module descriptor for the specified `DependencyDescriptor`. If this resolver can't find the module descriptor, `null` is returned.

Specified by:
  `findIvyFileRef` in interface `DependencyResolver`
Overrides:
  `findIvyFileRef` in class `AbstractPatternsBasedResolver`
Parameters:
  `dd` - the dependency descriptor
  `data` - the resolve data
Returns:
  the module descriptor, or `null`

#### findArtifactRef

    public ResolvedResource findArtifactRef(Artifact artifact,
                                   java.util.Date date)

Overrides:
  `findArtifactRef` in class `AbstractPatternsBasedResolver`

#### setM2compatible

    public void setM2compatible(boolean m2compatible)

Overrides:
  `setM2compatible` in class `AbstractPatternsBasedResolver`

#### ensureConfigured

    public void ensureConfigured(ResolverSettings settings)

#### getModuleDescriptorExtension

    protected java.lang.String getModuleDescriptorExtension()

Overrides:
  `getModuleDescriptorExtension` in class `AbstractPatternsBasedResolver`

#### getPattern

    public java.lang.String getPattern()

#### setPattern

    public void setPattern(java.lang.String pattern)

#### getRoot

    public java.lang.String getRoot()

#### setRoot

    public void setRoot(java.lang.String root)

Sets the root of the maven like repository. The maven like repository is necessarily an http repository.

Parameters:
  `root` - the root of the maven like repository
Throws:
  `java.lang.IllegalArgumentException` - if root does not start with "http://"

#### publish

    public void publish(Artifact artifact,
               java.io.File src)

#### listTokenValues

    public java.lang.String[] listTokenValues(java.lang.String token,
                                     java.util.Map otherTokenValues)

Description copied from interface: `DependencyResolver`
List all the values the given token can take if other tokens are set as described in the otherTokenValues map. For instance, if token = "revision" and the map contains "organisation"->"foo" "module"->"bar" The results will be the list of revisions of the module bar from the org foo.

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 `DependencyResolver.getNamespace()`.

Specified by:
  `listTokenValues` in interface `DependencyResolver`
Overrides:
  `listTokenValues` in class `BasicResolver`

#### listTokenValues

    protected java.lang.String[] listTokenValues(java.lang.String pattern,
                                     java.lang.String token)

Overrides:
  `listTokenValues` in class `RepositoryResolver`

#### listOrganisations

    public OrganisationEntry[] listOrganisations()

Specified by:
  `listOrganisations` in interface `DependencyResolver`
Overrides:
  `listOrganisations` in class `BasicResolver`

#### listModules

    public ModuleEntry[] listModules(OrganisationEntry org)

Specified by:
  `listModules` in interface `DependencyResolver`
Overrides:
  `listModules` in class `BasicResolver`

#### listRevisions

    public RevisionEntry[] listRevisions(ModuleEntry mod)

Specified by:
  `listRevisions` in interface `DependencyResolver`
Overrides:
  `listRevisions` in class `BasicResolver`

#### listResources

    protected ResolvedResource[] listResources(Repository repository,
                                   ModuleRevisionId mrid,
                                   java.lang.String pattern,
                                   Artifact artifact)

Description copied from class: `RepositoryResolver`
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.

Overrides:
  `listResources` in class `RepositoryResolver`
Parameters:
  `repository` - the repository in which revisions should be located
  `mrid` - the module revision id to look for (except revision)
  `pattern` - the pattern to use to locate the revisions
  `artifact` - the artifact to find
Returns:
  an array of ResolvedResource, all pointing to a different revision of the given Artifact.

#### findTokenValues

    protected void findTokenValues(java.util.Collection names,
                       java.util.List patterns,
                       java.util.Map tokenValues,
                       java.lang.String token)

Overrides:
  `findTokenValues` in class `RepositoryResolver`

#### getTypeName

    public java.lang.String getTypeName()

Overrides:
  `getTypeName` in class `URLResolver`

#### getDependency

    public ResolvedModuleRevision getDependency(DependencyDescriptor dd,
                                       ResolveData data)
                                         throws java.text.ParseException

Description copied from interface: `DependencyResolver`
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 ##)

Specified by:
  `getDependency` in interface `DependencyResolver`
Overrides:
  `getDependency` in class `BasicResolver`
Throws:
  `java.text.ParseException`

#### download

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

Description copied from interface: `DependencyResolver`
Download artifacts with specified DownloadOptions.

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.

Specified by:
  `download` in interface `DependencyResolver`
Overrides:
  `download` in class `RepositoryResolver`
Parameters:
  `artifacts` - an array of artifacts to download. Must not be `null`.
  `options` - options to apply for this download. Must not be `null`.
Returns:
  a DownloadReport with details about each Artifact download.

#### exists

    public boolean exists(Artifact artifact)

Description copied from interface: `DependencyResolver`
Returns `true` if the given artifact can be located by this resolver and actually exist.

Specified by:
  `exists` in interface `DependencyResolver`
Overrides:
  `exists` in class `BasicResolver`
Parameters:
  `artifact` - the artifact which should be tested.
Returns:
  `true` if the given artifact can be located by this resolver and actually exist.

#### locate

    public ArtifactOrigin locate(Artifact artifact)

Description copied from class: `AbstractResolver`
Default implementation actually download the artifact Subclasses should overwrite this to avoid the download

Specified by:
  `locate` in interface `DependencyResolver`
Overrides:
  `locate` in class `BasicResolver`
Parameters:
  `artifact` - the artifact which should be located
Returns:
  the artifact location, or `null` if it can't be located by this resolver or doesn't exist.

#### getArtifactPatterns

    public java.util.List getArtifactPatterns()

Overrides:
  `getArtifactPatterns` in class `AbstractPatternsBasedResolver`

#### isUsepoms

    public boolean isUsepoms()

#### setUsepoms

    public void setUsepoms(boolean usepoms)

#### isUseMavenMetadata

    public boolean isUseMavenMetadata()

#### setUseMavenMetadata

    public void setUseMavenMetadata(boolean useMavenMetadata)

#### dumpSettings

    public void dumpSettings()

Specified by:
  `dumpSettings` in interface `DependencyResolver`
Overrides:
  `dumpSettings` in class `RepositoryResolver`