You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Kelsey Grant <Ke...@orion.co.nz> on 2002/12/02 05:09:36 UTC
Filtering and the @ character
Hi,
I have tried to get the filtering of files to operate with a start and
end token to one different to "@", but couldn't see a way to do this. We
want to do this as our files are marked up with $ characters, useful for
InstallAnywhere.
I have altered the filter task, to allow two extra attributes:
<filter filtersfile="${basedir}/project.properties" startoftoken="$$"
endoftoken="$$" />
Which will globally set the startOfToken and endOfToken properties in
the FilterSet class. In addition, you can do the following if you only
want to change the start/end of tokens without actually loading from a
file set.
<filter startoftoken="$$" endoftoken="$$" />
So I have two questions,
1. Was there an existing way to do this?
2. Can I submit this patch to the filter task, and associated test?
Regards,
Kelsey Grant
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Filtering and the @ character
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
I recommend highly *against* using <filter> because it defines a global
filterset that can be trouble later. I'd recommend you use nested
<filterset>'s for the tasks like <copy> where you need them.
The token can be changed on <filterset>. See its documentation:
http://jakarta.apache.org/ant/manual/CoreTypes/filterset.html
Erik
Kelsey Grant wrote:
> Hi,
>
> I have tried to get the filtering of files to operate with a start and
> end token to one different to "@", but couldn't see a way to do this. We
> want to do this as our files are marked up with $ characters, useful for
> InstallAnywhere.
>
> I have altered the filter task, to allow two extra attributes:
>
> <filter filtersfile="${basedir}/project.properties" startoftoken="$$"
> endoftoken="$$" />
>
> Which will globally set the startOfToken and endOfToken properties in
> the FilterSet class. In addition, you can do the following if you only
> want to change the start/end of tokens without actually loading from a
> file set.
>
> <filter startoftoken="$$" endoftoken="$$" />
>
> So I have two questions,
> 1. Was there an existing way to do this?
> 2. Can I submit this patch to the filter task, and associated test?
>
> Regards,
> Kelsey Grant
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>