【发布时间】:2013-07-12 13:42:57
【问题描述】:
我有两个 ant 文件:
1) 主文件
<include file="otherFile.xml" as="otherFile"/> <target name="firstTarget"> <antcall target="otherFile.secondTarget"/> </target>
2) 实用程序文件
<target name="secondTarget">
<antcall target="thirdTarget"/>
</target>
<target name="thirdTarget">
<echo message="ok"/>
</target>
当我调用firstTarget 时,它说找不到thirdTarget。
如果我以这种方式更改secondTarget:
<target name="secondTarget"> <antcall target="otherFile.thirdTarget"/> </target>
然后就可以了。但是我不能直接使用 secondTarget 。因为第二个文件不知道前缀 otherFile
【问题讨论】:
-
那么...您在主文件中导入了实用程序文件?
-
我用的是 include 而不是 import。