Class IvyBuildList

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class IvyBuildList
    extends IvyTask
    Creates an ant filelist of files (usually build.xml) ordered according to the dependencies declared in ivy files.
    • Field Detail

      • DESCRIPTOR_REQUIRED

        public static final java.lang.String DESCRIPTOR_REQUIRED
        See Also:
        Constant Field Values
      • buildFileSets

        private java.util.List<org.apache.tools.ant.types.FileSet> buildFileSets
      • reference

        private java.lang.String reference
      • haltOnError

        private boolean haltOnError
      • onMissingDescriptor

        private java.lang.String onMissingDescriptor
      • reverse

        private boolean reverse
      • ivyFilePath

        private java.lang.String ivyFilePath
      • root

        private java.lang.String root
      • excludeRoot

        private boolean excludeRoot
      • leaf

        private java.lang.String leaf
      • delimiter

        private java.lang.String delimiter
      • excludeLeaf

        private boolean excludeLeaf
      • onlydirectdep

        private boolean onlydirectdep
      • restartFrom

        private java.lang.String restartFrom
    • Constructor Detail

      • IvyBuildList

        public IvyBuildList()
    • Method Detail

      • addFileset

        public void addFileset​(org.apache.tools.ant.types.FileSet buildFiles)
      • getReference

        public java.lang.String getReference()
      • setReference

        public void setReference​(java.lang.String reference)
      • getRoot

        public java.lang.String getRoot()
      • setRoot

        public void setRoot​(java.lang.String root)
      • isExcludeRoot

        public boolean isExcludeRoot()
      • setExcludeRoot

        public void setExcludeRoot​(boolean root)
      • getLeaf

        public java.lang.String getLeaf()
      • setLeaf

        public void setLeaf​(java.lang.String leaf)
      • isExcludeLeaf

        public boolean isExcludeLeaf()
      • setExcludeLeaf

        public void setExcludeLeaf​(boolean excludeLeaf)
      • getDelimiter

        public java.lang.String getDelimiter()
      • setDelimiter

        public void setDelimiter​(java.lang.String delimiter)
      • getOnlydirectdep

        public boolean getOnlydirectdep()
      • setOnlydirectdep

        public void setOnlydirectdep​(boolean onlydirectdep)
      • 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
      • onMissingDescriptor

        private void onMissingDescriptor​(java.io.File buildFile,
                                         java.io.File ivyFile,
                                         java.util.List<java.io.File> noDescriptor)
      • extractModuleNames

        private java.lang.String extractModuleNames​(java.util.Set<MapMatcher> matchers)
      • filterModulesFromRoot

        private java.util.Collection<ModuleDescriptor> filterModulesFromRoot​(java.util.Collection<ModuleDescriptor> mds,
                                                                             java.util.List<ModuleDescriptor> rootmds)
        Returns a collection of ModuleDescriptors that are contained in the input collection of ModuleDescriptors and upon which the root module depends
        Parameters:
        mds - input collection of ModuleDescriptors
        rootmds - root module
        Returns:
        filtered list of modules
      • processFilterNodeFromRoot

        private void processFilterNodeFromRoot​(ModuleDescriptor node,
                                               java.util.Set<ModuleDescriptor> toKeep,
                                               java.util.Map<ModuleId,​ModuleDescriptor> moduleIdMap)
        Adds the current node to the toKeep collection and then processes the each of the direct dependencies of this node that appear in the moduleIdMap (indicating that the dependency is part of this BuildList)
        Parameters:
        node - the node to be processed
        toKeep - the set of ModuleDescriptors that should be kept
        moduleIdMap - reference mapping of moduleId to ModuleDescriptor that are part of the BuildList
      • filterModulesFromLeaf

        private java.util.Collection<ModuleDescriptor> filterModulesFromLeaf​(java.util.Collection<ModuleDescriptor> mds,
                                                                             java.util.List<ModuleDescriptor> leafmds)
        Returns a collection of ModuleDescriptors that are contained in the input collection of ModuleDescriptors which depends on the leaf module
        Parameters:
        mds - input collection of ModuleDescriptors
        leafmds - leaf module
        Returns:
        filtered list of modules
      • processFilterNodeFromLeaf

        private void processFilterNodeFromLeaf​(ModuleDescriptor node,
                                               java.util.Set<ModuleDescriptor> toKeep,
                                               java.util.Map<ModuleId,​ModuleDescriptor> moduleIdMap)
        Search in the moduleIdMap modules depending on node, add them to the toKeep set and process them recursively.
        Parameters:
        node - the node to be processed
        toKeep - the set of ModuleDescriptors that should be kept
        moduleIdMap - reference mapping of moduleId to ModuleDescriptor that are part of the BuildList
      • addBuildFile

        private void addBuildFile​(org.apache.tools.ant.types.Path path,
                                  java.io.File buildFile)
      • getIvyFileFor

        private java.io.File getIvyFileFor​(java.io.File buildFile)
      • isHaltonerror

        public boolean isHaltonerror()
      • setHaltonerror

        public void setHaltonerror​(boolean haltOnError)
      • getIvyfilepath

        public java.lang.String getIvyfilepath()
      • setIvyfilepath

        public void setIvyfilepath​(java.lang.String ivyFilePath)
      • getOnMissingDescriptor

        public java.lang.String getOnMissingDescriptor()
      • setOnMissingDescriptor

        public void setOnMissingDescriptor​(java.lang.String onMissingDescriptor)
      • isSkipbuildwithoutivy

        @Deprecated
        public boolean isSkipbuildwithoutivy()
        Deprecated.
        Returns:
        boolean
      • setSkipbuildwithoutivy

        @Deprecated
        public void setSkipbuildwithoutivy​(boolean skipBuildFilesWithoutIvy)
        Deprecated.
        Parameters:
        skipBuildFilesWithoutIvy - boolean
      • isReverse

        public boolean isReverse()
      • setReverse

        public void setReverse​(boolean reverse)
      • getRestartFrom

        public java.lang.String getRestartFrom()
      • setRestartFrom

        public void setRestartFrom​(java.lang.String restartFrom)