Mugo
Mugo

Reputation: 13

working build ant - mac

For example: where, basedir: /Users/xxx/Documents/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

Upvotes: 1

Views: 218

Answers (1)

Rebse
Rebse

Reputation: 10377

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>

Upvotes: 1

Related Questions