You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rich Mauri <rm...@callidussoftware.com> on 2004/03/30 02:15:48 UTC

RE: [BULK] - finding the absolute path of each file in a fileset

You can use property location trick for example:

<property name="abspathtofile" location="${relpathtofile}"/>

-----Original Message-----
From: Shakun Mahajan [mailto:shakun@customercaresolutions.com] 
Sent: Monday, March 29, 2004 4:11 PM
To: Ant Users List
Subject: [BULK] - finding the absolute path of each file in a fileset


Hi all,

I am using Ant (1.5.3) provided with Eclipse(2.1.3).

After I deploy, I need to change a few files by replacing the paths of
the included files. I have used the Ant task "Replaceregexp" to do the
replace. However, for a particular case, I need to know the absolute
path of the file in the filesystem(For e.g. for a file "xyz.txt", which
is included in the fileset, I want to know the absolute path). This
information will help me to extract the required the portion and do the
replace(the substitution regular expression depends on the file path).

Is there a way to do it in Ant ?

Regards,
Shakun

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: [BULK] - finding the absolute path of each file in a fileset

Posted by Shakun Mahajan <sh...@customercaresolutions.com>.
Hi Rich,

Sorry could not understand you.
my regex is like this :-
  <replaceregexp byline="true" flags="gi">
    <regexp pattern="pattern1"/>
    <substitution expression="pattern2"/>
   <fileset dir="${deploy.dir}/components">
     <include name="**/*.xsl"/>
    </fileset>
  </replaceregexp>

I need to figure out the path of each .xsl file and do an appropriate
substitution. How can I utilize your suggestion here?

Regards,

Shakun

----- Original Message ----- 
From: "Rich Mauri" <rm...@callidussoftware.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Monday, March 29, 2004 4:15 PM
Subject: RE: [BULK] - finding the absolute path of each file in a fileset


> You can use property location trick for example:
>
> <property name="abspathtofile" location="${relpathtofile}"/>
>
> -----Original Message-----
> From: Shakun Mahajan [mailto:shakun@customercaresolutions.com]
> Sent: Monday, March 29, 2004 4:11 PM
> To: Ant Users List
> Subject: [BULK] - finding the absolute path of each file in a fileset
>
>
> Hi all,
>
> I am using Ant (1.5.3) provided with Eclipse(2.1.3).
>
> After I deploy, I need to change a few files by replacing the paths of
> the included files. I have used the Ant task "Replaceregexp" to do the
> replace. However, for a particular case, I need to know the absolute
> path of the file in the filesystem(For e.g. for a file "xyz.txt", which
> is included in the fileset, I want to know the absolute path). This
> information will help me to extract the required the portion and do the
> replace(the substitution regular expression depends on the file path).
>
> Is there a way to do it in Ant ?
>
> Regards,
> Shakun
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org