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 class
static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<org.apache.tools.ant.types.FileSet>
private String
static final String
private boolean
private boolean
private boolean
private String
private String
private List<IvyBuildList.BuildListModule>
private boolean
private String
private String
private String
private boolean
private String
private List<IvyBuildList.BuildListModule>
Fields inherited from class org.apache.ivy.ant.IvyTask
ANT_PROJECT_CONTEXT_KEY
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addBuildFile
(org.apache.tools.ant.types.Path path, File buildFile) void
addFileset
(org.apache.tools.ant.types.FileSet buildFiles) private Set<MapMatcher>
convert
(List<IvyBuildList.BuildListModule> modulesList, String modulesString, IvySettings settings) void
The real logic of task execution after project has been set in the context.private String
extractModuleNames
(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 File
getIvyFileFor
(File buildFile) getLeaf()
boolean
getRoot()
boolean
boolean
boolean
boolean
boolean
Deprecated.private void
onMissingDescriptor
(File buildFile, File ivyFile, List<File> noDescriptor) 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.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)void
setDelimiter
(String delimiter) void
setExcludeLeaf
(boolean excludeLeaf) void
setExcludeRoot
(boolean root) void
setHaltonerror
(boolean haltOnError) void
setIvyfilepath
(String ivyFilePath) void
void
setOnlydirectdep
(boolean onlydirectdep) void
setOnMissingDescriptor
(String onMissingDescriptor) void
setReference
(String reference) void
setRestartFrom
(String restartFrom) void
setReverse
(boolean reverse) void
void
setSkipbuildwithoutivy
(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, toString
Methods 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, setTaskType
Methods 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:IvyTask
The 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.