本文介绍了验光仪在ANT文件类似code片段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的Ant文件如下code段这编译我的项目的SWF文件:
i have the following code snippet in my ANT File which compiles my project to a swf file :
<target name="my target">
<mxmlc file="${APPS_DIR}//@{appName}.mxml"
output="${DEPLOY_APPS_DIR}/@{appName}.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
optimize="true"
debug="${DEBUG_TF}"
locale="en_US"
static-rsls="false"
static-link-runtime-shared-libraries="false"
verify-digests="false">
<!-- BEGIN code A -->
...
...
...
<!-- END code A -->
</mxmlc>
</target>
由于我有使用 code A 以类似的方式很多文件,我想创建一个包含该$ C $ C可分离文件。
As i have much files that use the code A in similar way, I want to create a separable file which contains this code.
不过,我怎么可以从主Ant文件打电话吗?
But, how can I call it from the main ant file ?
推荐答案
我找到了解决办法。回答在同一时间由我自己问。我发现在这里 。
I found the solution. Answered and asked by myself at the same time. I was found it here.
您可以使用包括外部文件的XML的方式,让解析器蚂蚁做的工作:
You can use XML's way of including external files and let the parser do the job for Ant:
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY common SYSTEM "common.xml">
]>
<project name="test" default="test" basedir=".">
<target name="setup">
...
</target>
&common;
...
</project>
这篇关于验光仪在ANT文件类似code片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!