Class IBiblioResolver

    • Field Detail

      • DEFAULT_PATTERN

        @Deprecated
        public static final java.lang.String DEFAULT_PATTERN
        Deprecated.
        See Also:
        Constant Field Values
      • DEFAULT_ROOT

        @Deprecated
        public static final java.lang.String DEFAULT_ROOT
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • IBiblioResolver

        public IBiblioResolver()
    • Method Detail

      • ensureConfigured

        public void ensureConfigured​(ResolverSettings settings)
      • 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<java.lang.String,​java.lang.String> 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
        Parameters:
        token - String
        otherTokenValues - Map
        Returns:
        String[]
      • listTokenValues

        protected java.lang.String[] listTokenValues​(java.lang.String pattern,
                                                     java.lang.String token)
        Overrides:
        listTokenValues in class RepositoryResolver
      • 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<java.lang.String> names,
                                       java.util.List<java.lang.String> patterns,
                                       java.util.Map<java.lang.String,​java.lang.String> tokenValues,
                                       java.lang.String token)
        Overrides:
        findTokenValues in class RepositoryResolver
      • 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
        Parameters:
        dd - DependencyDescriptor
        data - ResolveData
        Returns:
        ResolvedModuleRevision
        Throws:
        java.text.ParseException - if something goes wrong
      • 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.
      • isUsepoms

        public boolean isUsepoms()
      • setUsepoms

        public void setUsepoms​(boolean usepoms)
      • isUseMavenMetadata

        public boolean isUseMavenMetadata()
      • setUseMavenMetadata

        public void setUseMavenMetadata​(boolean useMavenMetadata)