gpt4 book ai didi

file - Antcall:从另一个文件调用嵌套的 Ant 目标

转载 作者:行者123 更新时间:2023-12-04 08:44:49 24 4
gpt4 key购买 nike

我有两个 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

最佳答案

你可以试试:

<ant antfile="otherFile.xml" target="secondTarget"/>

并且不需要包含 otherFile。

关于file - Antcall:从另一个文件调用嵌套的 Ant 目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17616363/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com