Welcome 微信登录

首页 / 软件开发 / JAVA / ivy中文参考文档(13)-ant任务(1)-buildlist

ivy中文参考文档(13)-ant任务(1)-buildlist2012-08-03 BlogJava skybuildlist任务用于获取按照ivy依赖信息从小到大排序的文件(通常是build.xml文件) 列表,或者相反(从1.2之后)

这个任务在结合subant构建相关项目集合时特别有效, 可以确保依赖在其他依赖它的模块之前被构建。

当你要排序的模块的ivy.xml不包含修订版本号,在依赖上定义的rev属性将不被使用。

当你要排序的模块的ivy.xml包含修订版本号,修订版本号将被使用。如果修订版本号和依赖描述不匹配,将会记录警告日志而模块被 认为是不同的模块.

从1.3版本起,root属性也可以用来在找到的所有模块之中只选择依赖(不管式直接还是间接)root模块的模块。可以和excluderoot属性 同时使用,当设置为true时将从列表中排除root自己。

从1.4版本起, leaf属性也可以用来在找到的所有模块之中只选择依赖(不管式直接还是间接)leaf模块的模块。可以和excludeleaf属性 同时使用,当设置为true时将从列表中排除leaf自己。

从1.4版本起, 在这个任务执行之后ivy.sorted.modules属性将在ant中设置,值为逗号分隔的排序好的模块列表。这可以用于调试或者 报告。

从2.0版本起,root和leaf属性可以是用来作为root的模块的分隔列表。这些模块和他们所有的模块将被包含在构建列表中。

从2.0版本起,默认所有循环依赖的模块将被组合,以便在这个循环中的任何模块的任何依赖都在循环中的模块前出现。如果有一个依 赖路径在模块A和B之间(但是没有从B到A的依赖路径),B将在A之前出现,即使A被包含在一个用来排序的模块集合的循环中。

从2.0版本起,当你指定roo和leaf模块你可以限制结果列表为只有root模块的直接依赖或者leaf模块的直接依赖。

从2.0版本起,你可以指定一个restartFrom模块。和root或者leaf不同的是,你可以得到一个从restartFrom模块开始的,后面是如果 这个参数没有设置时应该在后面的所有模块,的文件列表,(即使没有依赖在restartFrom和后面的模块之间)

属性描述要求
referencethe reference of the path to set
要设置的路径引用
Yes
ivyfilepaththe relative path from files to order to corresponding ivy files
从文件到对应的ivy文件的相对路径
No. 默认为 ${ivy.buildlist.ivyfilepath}
rootsince 2.0 the names of the modules which should be considered as the root of the buildlist.
从2.0起 模块名 (可以是多个)将被认为是构建列表的root
since 1.3 Was limited to only one module name before 2.0.
从1.3起在2.0前被 限制为只能设置一个模块名
No. 默认没有root (在构建列表中所有模块都将被使用)
excluderootsince 1.3 true if the root defined should be excluded from the list
从1.3起 true如果需要将定义的root排除在 列表之外
No. 默认是false
leafsince 2.0 the names of the modules which should be considered as the leaf of the buildlist.
从2.0起 模块名 (可以是多个)将被认为是构建列表的leaf
since 1.4.1 Was limited to only one module name before 2.0.
从1.4.1起在2.0 前被限制为只能设置一个模块名
No. 默认没有leaf (在构建列表中所有模块都将被使用)
onlydirectdepsince 2.0 true if the
resulting list should be restricted to direct dependencies of root modules or modules that directly depends on the leaf modules.
This field is ignored when neither root neither leaf is filled.
从2.0起 true如果结果列表被限制为root模块的直接依赖或者直接依赖leaf模块。当root和leaf都没有被设置时这个属性将 被忽略
No. 默认是false
delimitersince 2.0 delimiter to use when specifying multiple module names in the root and leaf properties.
从2.0起 当指定多个模块名时在root和leaf属性中使用的分隔符
No. 默认是逗号(,).
excludeleafsince 1.4.1 true if the leaf defined should be excluded from the list
从1.4.1起 true如果需要将定义的leaf排 除在列表之外
No. 默认是false
haltonerrortrue to halt the build when an invalid ivy file is encountered, false to continue
当遇到一个无效的ivy文件 时,true终止构建,false继续
No. 默认是true
skipbuildwithoutivyDeprecated, use onMissingDescriptor instead. true 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.
申明不赞成继续使用,请使用onMissingDescripto。
No. 默认是false
onMissingDescriptorsince 2.0 Specify the action to take when no module descriptor file is found for a file of the fileset. Possible values are:
从2.0起 当文件集合中的一个文件找不到模块描述文件时指定处理动作:
head
put at the head of the built filelist.
tail
put at the tail of the built filelist.
skip
skip the file, which won"t be put in the build filelist at all.
warn
warn and put at the head of the build filelist.
fail
halt the build with a failure.
No. Defaults to "head"
reversetrue to obtain the list in the reverse order, i.e. from the most dependent to the least one
true 用于获取 倒叙排列的列表。例如从最大依赖到最小
No. 默认是 false
restartFromsince 2.0 The name of the module which should be considered as the starting point in the buildlist. This allows for the build to be started at any point in the dependency chain.
从2.0起 被认为是构建列表的起点的模块的名字。这容许 构建从依赖链的任意节点开始。
No. 默认没有restart point (在构建列表中所有模块都将被使用).
settingsRefsince 2.0 A reference to the ivy settings that must be used by this task
从2.0起 必须被这个任务使用的ivy设 置的一个引用。
No, 默认使用"ivy.instance".