Class IvyRepResolver

  • All Implemented Interfaces:
    Validatable, DependencyResolver, HasLatestStrategy

    public class IvyRepResolver
    extends URLResolver
    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.
    • Constructor Detail

      • IvyRepResolver

        public IvyRepResolver()
    • Method Detail

      • getIvypattern

        public java.lang.String getIvypattern()
      • setIvypattern

        public void setIvypattern​(java.lang.String pattern)
      • getIvyroot

        public java.lang.String getIvyroot()
      • setIvyroot

        public void setIvyroot​(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)
      • getArtroot

        public java.lang.String getArtroot()
      • getArtpattern

        public java.lang.String getArtpattern()
      • setArtpattern

        public void setArtpattern​(java.lang.String pattern)
      • setArtroot

        public void setArtroot​(java.lang.String root)
      • 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.