Class RepositoryResolver

    • Constructor Detail

      • RepositoryResolver

        public RepositoryResolver()
    • Method Detail

      • getRepository

        public Repository getRepository()
      • setRepository

        public void setRepository​(Repository repository)
      • setSigner

        public void setSigner​(java.lang.String signerName)
      • getResource

        protected Resource getResource​(java.lang.String source)
                                throws java.io.IOException
        Specified by:
        getResource in class BasicResolver
        Throws:
        java.io.IOException
      • listResources

        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.
        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.
      • get

        protected long get​(Resource resource,
                           java.io.File dest)
                    throws java.io.IOException
        Specified by:
        get in class BasicResolver
        Throws:
        java.io.IOException
      • publish

        public void publish​(Artifact artifact,
                            java.io.File src,
                            boolean overwrite)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getDestination

        protected java.lang.String getDestination​(java.lang.String pattern,
                                                  Artifact artifact,
                                                  ModuleRevisionId mrid)
      • put

        protected void put​(Artifact artifact,
                           java.io.File src,
                           java.lang.String dest,
                           boolean overwrite)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • putChecksum

        protected void putChecksum​(Artifact artifact,
                                   java.io.File src,
                                   java.lang.String dest,
                                   boolean overwrite,
                                   java.lang.String algorithm)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • putSignature

        protected void putSignature​(Artifact artifact,
                                    java.io.File src,
                                    java.lang.String dest,
                                    boolean overwrite)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • 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 BasicResolver
        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.
      • 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 AbstractPatternsBasedResolver
      • isAlwaysCheckExactRevision

        public boolean isAlwaysCheckExactRevision()
      • setAlwaysCheckExactRevision

        public void setAlwaysCheckExactRevision​(boolean alwaysCheckExactRevision)