Tuesday 15 September 2015

Converting ../ in paths in Ant -


I have an ant in which it has the line:

WORKSPACE.dir = $ {Baseir} /../

Then I have:

CORE_PROJECT.dir = $ {WORKSPACE.dir} / UUI_Core

Which means that I end up with such paths:

C: \ Dev \ Vertical \ RTC \ UUI_Core_ANT /..// UUI_Core < / Code>

It works fine in almost all cases but I try to make a list of classes used in a build I ha. At the moment I have this code:

  & lt; Pathconvert property = "coreClasses" pathsep = "dirsep =". " Refid = "coreSources" & gt; & Lt; = = "C: \ dev \ workspaces \ RTC \ UUI_Core \ src \" from = "" = & gt; & Lt; Mapper & gt; & Lt; Chainedmapper & gt; & Lt; = "*." From globmapper = "*" /> gt; & Lt; / Chainedmapper & gt; & Lt; Chainedmapper & gt; & Lt; = "*. As" from globmapper = "*" /> & Lt; / Chainedmapper & gt; & Lt; / Map & gt; & Lt; / Pathconvert & gt;  

Which file space and JSUT package work to quit? Although it is not very flexible. I should be able to use CORE_PROJECT.dir here.

So, how can I change

C: \ dev \ workspaces \ RTC \ UUI_Core_ANT /..// UUI_Core

to

C: \ देव \ workspace \ RTC \ uuI_Core

  WORKSPACE.dir = $ {baseir} /../  

This is not a valid anti syntax. To convert location attribute & lt; instead of location Property & gt; should work using . Location replaces the attribute value with a full path in your case:

  & lt; Property Name = "WORKSPACE.dir" location = "$ {baseir} / .." />  

edit : When using path-like properties, use the always location attribute needed.


No comments:

Post a Comment