开发者

Specifying up directory in build.xml for ant in windows

开发者 https://www.devze.com 2023-04-09 04:47 出处:网络
I have a build.xml file for ant, and I want to modify a directory from <condition 开发者_StackOverflow社区property=\"flex_sdk\" value=\"%cd%/SDK/flex_sdk/\">

I have a build.xml file for ant, and I want to modify a directory from

<condition 开发者_StackOverflow社区property="flex_sdk" value="%cd%/SDK/flex_sdk/">
        <os family="windows" />
</condition>

to

<condition property="flex_sdk" value="../SDK/flex_sdk/">
        <os family="windows" />
</condition>

The flex_sdk bin directory has .bat files so they are run using cmd /c. I get the error "'..' is not recognized as an internal or external command".

Any help is greatly appreciated. Thanks.


Maybe you could try this :

<property name="bat.dir" location="${flex_sdk}"/>

The location attribute if specified in a property resolves relative paths based on the ${basedir} which is the directory of your ant build.xml file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号