Class IvyCacheFileset

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class IvyCacheFileset
    extends IvyCacheTask
    Creates an ant fileset consisting in all artifacts found during a resolve. Note that this task is not compatible with the useOrigin mode.
    • Field Detail

      • setid

        private java.lang.String setid
    • Constructor Detail

      • IvyCacheFileset

        public IvyCacheFileset()
    • Method Detail

      • getSetid

        public java.lang.String getSetid()
      • setSetid

        public void setSetid​(java.lang.String id)
      • doExecute

        public void doExecute()
                       throws org.apache.tools.ant.BuildException
        Description copied from class: IvyTask
        The real logic of task execution after project has been set in the context. MUST be implemented by subclasses
        Specified by:
        doExecute in class IvyTask
        Throws:
        org.apache.tools.ant.BuildException - if something goes wrong
      • requireCommonBaseDir

        java.io.File requireCommonBaseDir​(java.util.List<ArtifactDownloadReport> artifactDownloadReports)
        Returns a common base directory, determined from the local files of the passed artifactDownloadReports. If no common base directory can be determined, this method throws a BuildException
        Parameters:
        artifactDownloadReports - The artifact download reports for which the common base directory of the artifacts has to be determined
        Returns:
        File
      • getPath

        private java.lang.String getPath​(java.io.File base,
                                         java.io.File file)
        Returns the path of the file relative to the given base directory.
        Parameters:
        base - the parent directory to which the file must be evaluated.
        file - the file for which the path should be returned
        Returns:
        the path of the file relative to the given base directory.
      • getBaseDir

        java.io.File getBaseDir​(java.io.File file1,
                                java.io.File file2)
        Returns the common base directory between the passed file1 and file2.

        The returned base directory will be a parent of both the file1 and file2 or it will be null.

        Parameters:
        file1 - One of the files, for which the common base directory is being sought, may be null.
        file2 - The other file for which the common base directory should be returned, may be null.
        Returns:
        the common base directory between a file1 and file2. Returns null if no common base directory could be determined or if either file1 or file2 is null
      • getParents

        private java.util.LinkedList<java.io.File> getParents​(java.io.File file)
        Returns:
        a list of files, starting with the root and ending with the file itself