Package org.apache.ivy.ant
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
Creates an ant filelist of files (usually build.xml) ordered according to the dependencies
declared in ivy files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<org.apache.tools.ant.types.FileSet>private Stringstatic final Stringprivate booleanprivate booleanprivate booleanprivate Stringprivate Stringprivate List<IvyBuildList.BuildListModule>private booleanprivate Stringprivate Stringprivate Stringprivate booleanprivate Stringprivate List<IvyBuildList.BuildListModule>Fields inherited from class org.apache.ivy.ant.IvyTask
ANT_PROJECT_CONTEXT_KEYFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddBuildFile(org.apache.tools.ant.types.Path path, File buildFile) voidaddFileset(org.apache.tools.ant.types.FileSet buildFiles) private Set<MapMatcher>convert(List<IvyBuildList.BuildListModule> modulesList, String modulesString, IvySettings settings) voidThe real logic of task execution after project has been set in the context.private StringextractModuleNames(Set<MapMatcher> matchers) 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 moduleprivate 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 dependsprivate List<ModuleDescriptor>findModuleDescriptors(Collection<ModuleDescriptor> mds, Set<MapMatcher> matchers, String kind) private FilegetIvyFileFor(File buildFile) getLeaf()booleangetRoot()booleanbooleanbooleanbooleanbooleanDeprecated.private voidonMissingDescriptor(File buildFile, File ivyFile, List<File> noDescriptor) private voidprocessFilterNodeFromLeaf(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.private voidprocessFilterNodeFromRoot(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)voidsetDelimiter(String delimiter) voidsetExcludeLeaf(boolean excludeLeaf) voidsetExcludeRoot(boolean root) voidsetHaltonerror(boolean haltOnError) voidsetIvyfilepath(String ivyFilePath) voidvoidsetOnlydirectdep(boolean onlydirectdep) voidsetOnMissingDescriptor(String onMissingDescriptor) voidsetReference(String reference) voidsetRestartFrom(String restartFrom) voidsetReverse(boolean reverse) voidvoidsetSkipbuildwithoutivy(boolean skipBuildFilesWithoutIvy) Deprecated.usesetOnMissingDescriptor(String)instead.Methods inherited from class org.apache.ivy.ant.IvyTask
cacheAttributeNotSupported, doValidate, execute, finalizeTask, getIvyInstance, getProperty, getProperty, getProperty, getProperty, getPubDate, getResolvedConfigurations, getResolvedDescriptor, getResolvedDescriptor, getResolvedDescriptor, getResolvedDescriptor, getResolvedReport, getSettings, getSettingsRef, isValidate, mergeConfs, prepareTask, setResolved, setResolved, setSettingsRef, setValidate, splitConfs, toStringMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
DESCRIPTOR_REQUIRED
- See Also:
-
buildFileSets
-
reference
-
haltOnError
private boolean haltOnError -
onMissingDescriptor
-
reverse
private boolean reverse -
ivyFilePath
-
root
-
roots
-
excludeRoot
private boolean excludeRoot -
leaf
-
leafs
-
delimiter
-
excludeLeaf
private boolean excludeLeaf -
onlydirectdep
private boolean onlydirectdep -
restartFrom
-
-
Constructor Details
-
IvyBuildList
public IvyBuildList()
-
-
Method Details
-
addFileset
public void addFileset(org.apache.tools.ant.types.FileSet buildFiles) -
getReference
-
setReference
-
getRoot
-
setRoot
-
createRoot
-
isExcludeRoot
public boolean isExcludeRoot() -
setExcludeRoot
public void setExcludeRoot(boolean root) -
getLeaf
-
setLeaf
-
createLeaf
-
isExcludeLeaf
public boolean isExcludeLeaf() -
setExcludeLeaf
public void setExcludeLeaf(boolean excludeLeaf) -
getDelimiter
-
setDelimiter
-
getOnlydirectdep
public boolean getOnlydirectdep() -
setOnlydirectdep
public void setOnlydirectdep(boolean onlydirectdep) -
doExecute
public void doExecute() throws org.apache.tools.ant.BuildExceptionDescription copied from class:IvyTaskThe real logic of task execution after project has been set in the context. MUST be implemented by subclasses -
convert
private Set<MapMatcher> convert(List<IvyBuildList.BuildListModule> modulesList, String modulesString, IvySettings settings) -
onMissingDescriptor
-
findModuleDescriptors
private List<ModuleDescriptor> findModuleDescriptors(Collection<ModuleDescriptor> mds, Set<MapMatcher> matchers, String kind) -
extractModuleNames
-
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 ModuleDescriptorsrootmds- 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 processedtoKeep- the set of ModuleDescriptors that should be keptmoduleIdMap- 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 ModuleDescriptorsleafmds- 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 processedtoKeep- the set of ModuleDescriptors that should be keptmoduleIdMap- reference mapping of moduleId to ModuleDescriptor that are part of the BuildList
-
addBuildFile
-
getIvyFileFor
-
isHaltonerror
public boolean isHaltonerror() -
setHaltonerror
public void setHaltonerror(boolean haltOnError) -
getIvyfilepath
-
setIvyfilepath
-
getOnMissingDescriptor
-
setOnMissingDescriptor
-
isSkipbuildwithoutivy
Deprecated.usegetOnMissingDescriptor()instead.- Returns:
- boolean
-
setSkipbuildwithoutivy
Deprecated.usesetOnMissingDescriptor(String)instead.- Parameters:
skipBuildFilesWithoutIvy- boolean
-
isReverse
public boolean isReverse() -
setReverse
public void setReverse(boolean reverse) -
getRestartFrom
-
setRestartFrom
-
getOnMissingDescriptor()instead.