Welcome 微信登录

首页 / 软件开发 / JAVA / ivy中文参考文档(15)-ant任务(3)-retrieve

ivy中文参考文档(15)-ant任务(3)-retrieve2012-08-05 BlogJava sky1) retrieve

retrieve任务复制解析好的依赖到你的文件系统的任何位置。

这是一个post resolve任务,带有所有post resolve任务共有的所有的行为和属性。

从1.4起 这个任务甚至可以根据依赖解析的结果用实际应该存在的东西来同步目标目录。这意味着如果设置sync为"true",ivy不仅将 复制必要的文件,而且它还会删除那些不再需要在那里的文件。

同步实际上是删除root目标目录下不再是retrieve任务必须的所有文件和目录。

root目标目录是 在目标正则表达式中的标示为第一级别的第一个标记的目录。

例如:

pattern: lib/[conf]/[artifact].[ext]

root: lib

2) 属性

属性描述必要
patternthe pattern to use to copy the dependencies

用来复制依赖的正则表达式
No. 默认为 ${ivy.retrieve.pattern}
ivypatternthe pattern to use to copy the ivy files of dependencies since 1.3

从1.3起用来复制依赖的ivy文件的正 则表达式
No. 默认不获取依赖的ivy文件
confa comma separated list of the configurations to retrieve

用于获取的配置的列表,逗号分隔
No.默认为被最后一次resolve调用解析好的配置,或者在没有显示调用resoleve时的*
synctrue to synchronize the destination, false to just make a copy since 1.4

从1.4起 true 同步目录路径, false仅仅复制
No. 默认为 false
typecomma separated list of accepted artifact types since 1.4

从1.4起 可接受的制品类型列表,逗号分隔
No. 默认所有制品类型都被接受
symlinktrue to create symbolic links, false to copy the artifacts. The destination of the symbolic links depends on the value of the useOrigin attribute (since 2.0)

true 创建符号链接,false复制制品。符号链接的目的地取决于 useOrigin属性的值(从2.0起)
No. 默认为 false
settingsRefA reference to the ivy settings that must be used by this task (since 2.0)

必须被这次任务使用的iry设 置的引用
No, 默认使用"ivy.instance"
logthe log setting to use during the resolve and retrieve process. (since 2.0)

Available options are the same as for resolve when used to trigger resolve automatically (see postresolvetask), or the following for the retrieve process only:

default

the default log settings, where all usual messages are output to the console

quiet

disable all usual messages, making the whole retrieve process quiet unless errors occur
No, defaults to "default".