我在脚本开头填充了一个文件集,如下所示;
<!-- Define the list of projects to be built -->
<fileset id="ivy.buildlist.fileset" dir="${ivy.buildlist.dir}" includes="${ivy.buildlist.includes}" excludes="${ivy.buildlist.excludes}" />
但是如果用户选择特定任务,我想更新这个参考。为此,我编写了一个新目标<intersect>
,将调用该目标,但不会更新引用;
<target name="getPreReleaseList" description="Target to override the component list for pre release" >
<echo message="Existing List : ${toString:ivy.buildlist.fileset}" />
<intersect>
<fileset refid="ivy.buildlist.fileset" />
<fileset dir="${ivy.buildlist.dir}"
includes="${ivy.pre.buildlist.includes}"
excludes="${ivy.pre.buildlist.excludes}" />
</intersect>
<echo message="Updated List : ${toString:ivy.buildlist.fileset}" />
</target>
之前和之后的列表ivy.buildlist.fileset
是相同的:(。我错过了什么还是我采用了不同的方法。