Class DownloadCache


  • public final class DownloadCache
    extends Object
    A class representing a download cache
    Author:
    Mickael Istria (Red Hat Inc)
    • Constructor Detail

      • DownloadCache

        public DownloadCache​(File cacheDirectory,
                             org.apache.maven.plugin.logging.Log log)
    • Method Detail

      • getArtifact

        public File getArtifact​(URI uri,
                                Checksums checksums)
        Get a File in the download cache. If no cache for this URL, or if expected checksums don't match cached ones, returns null. available in cache,
        Parameters:
        uri - URL of the file
        checksums - Supplied checksums.
        Returns:
        A File when cache is found, null if no available cache
      • install

        public void install​(URI uri,
                            File outputFile,
                            Checksums checksums)
                     throws org.apache.maven.plugin.MojoFailureException,
                            IOException
        Throws:
        org.apache.maven.plugin.MojoFailureException
        IOException