我有一个需要在父目录中运行的 Ant 任务。当我将 basedir 设置为父目录时,令牌没有被正确替换。
<project name="Flex Ant Tasks Build Script" default="compileFlex" basedir="../">
<!-- load previously defined configuration properties file -->
<property file="local_build.properties" />
<!-- delete and create the DEPLOY dir again -->
<target name="init">
<delete dir="${DEPLOY_DIR}" />
<mkdir dir="${DEPLOY_DIR}" />
</target>
和构建属性:
// this is the folder we want to publish the swf to
DEPLOY_DIR = ${basedir}/output
当 basedir 设置为“.”时 结果是:
[mkdir] Created dir: /Users/me/Documents/projects/MyProject/output
当我将 basedir 设置为父级时,“../”结果是:
[mkdir] Created dir: /Users/me/Documents/projects/${DEPLOY_DIR}
期望的结果是:
[mkdir] Created dir: /Users/me/Documents/projects/output
注意:
构建脚本位于:
/Users/me/Documents/projects/MyProject/
因为我似乎无法在 Eclipse 项目之外导入任何 ANT 构建文件