1

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

Rebse
  • 10,307
  • 2
  • 38
  • 66
Mugo
  • 13
  • 2

1 Answers1

1

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>
Rebse
  • 10,307
  • 2
  • 38
  • 66
  • We've had flags raised against some of your answers. From your older posts I noted that you used a sig with the name Gilbert. I also note on the flaka project page there is a committer named Gilbert. If you are the same person please can you disclose your flaka affiliation in your profile and in your posts sooner rather than later. I'm not discouraging you from referencing flaka in your posts provided they're on-topic with the OP's question and are realistic solutions. However the excessive number of links in recent posts looks like astro-turfing (see [faq#promotion]). Thanks. – Kev Jun 10 '11 at 00:35
  • 1
    Kev, thanks for your hints, shame on me. No more Regards .. (sorry i'm used to it from other sites) and no more excessive links in my postings (sorry copy + paste..), just one link on the Flaka project site, if the solution makes use of it btw. my posted solutions are always working and realistic. In my profile/info tab i have no notes yet.Is it allowed to introduce the open source project i'm participating as commiter ? I'll edit all my postings to make them stick to the rules.. Right now, my daily limit (5 edits) is consumed, will continue tomorrow.. – Rebse Jun 10 '11 at 16:10
  • No problem. You can use your profile for anything you like, just so long as it's not offensive. So go ahead to put anything you want in there to promote flaka or anything else you're working on. As far as the posts go, just use common sense. Thanks. – Kev Jun 10 '11 at 16:17