buildlist


The buildlist task enable to obtain a filelist of files (usually build.xml files) ordered according to ivy dependency information from the least dependent to the most one, or the inverse. (since 1.2)

This is particularly useful combined with subant, to build a set of interelated projects being sure that a dependency will be built before any module depending on it.

since 1.3 A root attribute can also be used to include, among all the modules found, only the one that are dependencies (either direct or transitive) of a root module. This can also be used with the excluderoot attribute, which when set to true will exclude the root itself from the list.

since 1.4.1 A leaf attribute can also be used to include, among all the modules found, only the one that have dependencies (either direct or transitive) on a leaf module. This can also be used with the excludeleaf attribute, which when set to true will exclude the leaf itself from the list.

since 1.4 The ivy.sorted.modules property is set in the ant at the end of the task with a comma separated list of ordered modules. This can be useful for debug or information purpose.

since 2.0 The root and leaf attributes can be a delimited list of modules to use as roots. These modules, and all their dependencies will be included in the build list.
AttributeDescriptionRequired
referencethe reference of the path to set Yes
ivyfilepaththe relative path from files to order to corresponding ivy filesNo. Defaults to ${ivy.buildlist.ivyfilepath}
rootsince 2.0 the names of the modules which should be considered as the root of the buildlist.
since 1.3 Was limited to only one module name before 2.0.
No. Defaults to no root (all modules are used in the build list)
excluderootsince 1.3 true if the root defined should be excluded from the listNo. Defaults to false
leafsince 2.0 the names of the modules which should be considered as the leaf of the buildlist.
since 1.4.1 Was limited to only one module name before 2.0.
No. Defaults to no leaf (all modules are used in the build list)
delimitersince 2.0 delimiter to use when specifying multiple module names in the root and leaf properties.No. Defaults to the comma (,) character.
excludeleafsince 1.4.1 true if the leaf defined should be excluded from the listNo. Defaults to false
haltonerrortrue to halt the build when an invalid ivy file is encountered, false to continueNo. Defaults to true
skipbuildwithoutivytrue to skip files of the fileset with no corresponding ivy file, false otherwise. If false the file with no corresponding ivy file will be considered as independent of the other and put at the beginning of the built filelist.No. Defaults to false
reversetrue to obtain the list in the reverse order, i.e. from the most dependent to the least oneNo. Defaults to default false

Parameters specified as nested elements

fileset

FileSets are used to select sets of files to order.

Examples

    <ivy:buildlist reference="build-path">
<fileset dir="projects" includes="**/build.xml"/>
</ivy:buildlist>
Builds a list of build.xml files sorted according to the ivy.xml files found at the same level (the default value for ivyfilepath is ivy.xml).

This list can then be used like that:
    <subant target="build" buildpathref="build-path" />

    <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" reverse="true">
<fileset dir="projects" includes="**/build.xml"/>
</ivy:buildlist>
Builds a list of build.xml files sorted according to the ivy.xml files found in an ivy directory relative to those build files. The list is sorted from the most dependent to the least one.

    <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" root="myapp">
<fileset dir="projects" includes="**/build.xml"/>
</ivy:buildlist>
Builds a list of build.xml files sorted according to the ivy.xml files found in an ivy directory relative to those build files. Only build.xml files of modules which are dependencies of myapp (either direct or transitive) are put in the result list.

    <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" leaf="mymodule">
<fileset dir="projects" includes="**/build.xml"/>
</ivy:buildlist>
Builds a list of build.xml files sorted according to the ivy.xml files found in an ivy directory relative to those build files. Only build.xml files of modules which have dependencies (direct or transitive) on mymodule are put in the result list.





Printer Friendly