Class IvyBuildList

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.ivy.ant.IvyTask
org.apache.ivy.ant.IvyBuildList
All Implemented Interfaces:
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 Details

    • DESCRIPTOR_REQUIRED

      public static final String DESCRIPTOR_REQUIRED
      See Also:
    • buildFileSets

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

      private String reference
    • haltOnError

      private boolean haltOnError
    • onMissingDescriptor

      private String onMissingDescriptor
    • reverse

      private boolean reverse
    • ivyFilePath

      private String ivyFilePath
    • root

      private String root
    • roots

    • excludeRoot

      private boolean excludeRoot
    • leaf

      private String leaf
    • leafs

    • delimiter

      private String delimiter
    • excludeLeaf

      private boolean excludeLeaf
    • onlydirectdep

      private boolean onlydirectdep
    • restartFrom

      private String restartFrom
  • Constructor Details

    • IvyBuildList

      public IvyBuildList()
  • Method Details

    • addFileset

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

      public String getReference()
    • setReference

      public void setReference(String reference)
    • getRoot

      public String getRoot()
    • setRoot

      public void setRoot(String root)
    • createRoot

      public IvyBuildList.BuildListModule createRoot()
    • isExcludeRoot

      public boolean isExcludeRoot()
    • setExcludeRoot

      public void setExcludeRoot(boolean root)
    • getLeaf

      public String getLeaf()
    • setLeaf

      public void setLeaf(String leaf)
    • createLeaf

      public IvyBuildList.BuildListModule createLeaf()
    • isExcludeLeaf

      public boolean isExcludeLeaf()
    • setExcludeLeaf

      public void setExcludeLeaf(boolean excludeLeaf)
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(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
    • convert

      private Set<MapMatcher> convert(List<IvyBuildList.BuildListModule> modulesList, String modulesString, IvySettings settings)
    • onMissingDescriptor

      private void onMissingDescriptor(File buildFile, File ivyFile, List<File> noDescriptor)
    • findModuleDescriptors

      private List<ModuleDescriptor> findModuleDescriptors(Collection<ModuleDescriptor> mds, Set<MapMatcher> matchers, String kind)
    • extractModuleNames

      private String extractModuleNames(Set<MapMatcher> matchers)
    • filterModulesFromRoot

      private Collection<ModuleDescriptor> filterModulesFromRoot(Collection<ModuleDescriptor> mds, 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, Set<ModuleDescriptor> toKeep, 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 Collection<ModuleDescriptor> filterModulesFromLeaf(Collection<ModuleDescriptor> mds, 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, Set<ModuleDescriptor> toKeep, 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, File buildFile)
    • getIvyFileFor

      private File getIvyFileFor(File buildFile)
    • isHaltonerror

      public boolean isHaltonerror()
    • setHaltonerror

      public void setHaltonerror(boolean haltOnError)
    • getIvyfilepath

      public String getIvyfilepath()
    • setIvyfilepath

      public void setIvyfilepath(String ivyFilePath)
    • getOnMissingDescriptor

      public String getOnMissingDescriptor()
    • setOnMissingDescriptor

      public void setOnMissingDescriptor(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 String getRestartFrom()
    • setRestartFrom

      public void setRestartFrom(String restartFrom)