开发者

working build ant - mac

开发者 https://www.devze.com 2023-03-12 00:28 出处:网络
For example: where, basedir: /Users/xxx/Docu开发者_运维问答ments/wspace/myappEar how to use return parent directory to use like this:

For example: where, basedir: /Users/xxx/Docu开发者_运维问答ments/wspace/myappEar

how to use return parent directory to use like this: /Users/xxx/Documents/wspace/

To do this i've tried

<property name="workspace.dir" value="${basedir}\.." />

and does not work in my mac os.

Any Idea what is the problem?

Regardles

Mugo


with vanilla ant you have to use =

<property name="workspace.dir" location=".."/>

or alternatively use the Ant Plugin Flaka =

<project xmlns:fl="antlib:it.haefelinger.flaka">

    <fl:echo>
    working.dir => #{project.baseDir.parent}
  </fl:echo>

    <!-- create property for further processing -->
    <fl:let>working.dir := project.baseDir.parent</fl:let>

  <echo>$${working.dir} = ${working.dir}</echo>

</project>
0

精彩评论

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