You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Aaron Davies <aa...@gmail.com> on 2006/06/15 19:35:12 UTC

Token Filters Questions

A couple questions on token filters:

First, is there a simple way to directly apply a filtersfile to an
existing file, i.e. without moving/copying it?

Second, is there an easy way to handle a filtersfile's not existing?
I'd like to run a file through multiple filters, not all of which will
actually exist, but the only way I can see to do that right now is to
either wrap multiple copy-filter statements in available tests or to
do the full truth table on all the filters and use it to generate the
correct filterset. There's got to be a better option.
-- 
Aaron Davies
aaron.davies@gmail.com

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


Re: Token Filters Questions

Posted by Aaron Davies <aa...@gmail.com>.
I've decided to go with option three: commit empty filter files to
svn. The problem with option two is that we want to run our files past
multiple filters, each of which may or may not exist, and doing this
with if statements is extremely difficult. The problem with option one
is that I'm lazy. ;-)

On 6/19/06, Asaf Mesika <as...@gmail.com> wrote:
> The way I see it, there's two solutions:
> 1. Take the source for FiltersFile, and change the exception section, which
> doesn't fit you.
> 2. Check if the file exists, prior to it (using the <IF> tags in the
> expansion pack, ant-contrib, I think) and then activate FiltersFile.
>
> Asaf
>
>
> > -----Original Message-----
> > From: Aaron Davies [mailto:aaron.davies@gmail.com]
> > Sent: Monday, June 19, 2006 2:40 PM
> > To: Ant Users List
> > Subject: Re: Token Filters Questions
> >
> > If the filter is done with a property file <filtersfile
> > file="filter.properties"/> and the property file doesn't exist, an
> > exception is thrown. Is there a way to do more graceful degradation?
> >
> > On 6/18/06, Asaf Mesika <as...@gmail.com> wrote:
> > > I'm not sure I understood your question: How can a filter not exist? Can
> > you
> > > give an example?
> > >
> > > On 6/15/06, Aaron Davies <aa...@gmail.com> wrote:
> > > >
> > > > A couple questions on token filters:
> > > >
> > > > First, is there a simple way to directly apply a filtersfile to an
> > > > existing file, i.e. without moving/copying it?
> > > >
> > > > Second, is there an easy way to handle a filtersfile's not existing?
> > > > I'd like to run a file through multiple filters, not all of which will
> > > > actually exist, but the only way I can see to do that right now is to
> > > > either wrap multiple copy-filter statements in available tests or to
> > > > do the full truth table on all the filters and use it to generate the
> > > > correct filterset. There's got to be a better option.
> > > > --
> > > > Aaron Davies
> > > > aaron.davies@gmail.com
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > > For additional commands, e-mail: user-help@ant.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Aaron Davies
> > aaron.davies@gmail.com
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
Aaron Davies
aaron.davies@gmail.com

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


RE: Token Filters Questions

Posted by Asaf Mesika <as...@gmail.com>.
The way I see it, there's two solutions:
1. Take the source for FiltersFile, and change the exception section, which
doesn't fit you.
2. Check if the file exists, prior to it (using the <IF> tags in the
expansion pack, ant-contrib, I think) and then activate FiltersFile.

Asaf


> -----Original Message-----
> From: Aaron Davies [mailto:aaron.davies@gmail.com]
> Sent: Monday, June 19, 2006 2:40 PM
> To: Ant Users List
> Subject: Re: Token Filters Questions
> 
> If the filter is done with a property file <filtersfile
> file="filter.properties"/> and the property file doesn't exist, an
> exception is thrown. Is there a way to do more graceful degradation?
> 
> On 6/18/06, Asaf Mesika <as...@gmail.com> wrote:
> > I'm not sure I understood your question: How can a filter not exist? Can
> you
> > give an example?
> >
> > On 6/15/06, Aaron Davies <aa...@gmail.com> wrote:
> > >
> > > A couple questions on token filters:
> > >
> > > First, is there a simple way to directly apply a filtersfile to an
> > > existing file, i.e. without moving/copying it?
> > >
> > > Second, is there an easy way to handle a filtersfile's not existing?
> > > I'd like to run a file through multiple filters, not all of which will
> > > actually exist, but the only way I can see to do that right now is to
> > > either wrap multiple copy-filter statements in available tests or to
> > > do the full truth table on all the filters and use it to generate the
> > > correct filterset. There's got to be a better option.
> > > --
> > > Aaron Davies
> > > aaron.davies@gmail.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: user-help@ant.apache.org
> > >
> > >
> >
> >
> 
> 
> --
> Aaron Davies
> aaron.davies@gmail.com
> 
> ---------------------------------------------------------------------
> 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


Re: Token Filters Questions

Posted by Aaron Davies <aa...@gmail.com>.
If the filter is done with a property file <filtersfile
file="filter.properties"/> and the property file doesn't exist, an
exception is thrown. Is there a way to do more graceful degradation?

On 6/18/06, Asaf Mesika <as...@gmail.com> wrote:
> I'm not sure I understood your question: How can a filter not exist? Can you
> give an example?
>
> On 6/15/06, Aaron Davies <aa...@gmail.com> wrote:
> >
> > A couple questions on token filters:
> >
> > First, is there a simple way to directly apply a filtersfile to an
> > existing file, i.e. without moving/copying it?
> >
> > Second, is there an easy way to handle a filtersfile's not existing?
> > I'd like to run a file through multiple filters, not all of which will
> > actually exist, but the only way I can see to do that right now is to
> > either wrap multiple copy-filter statements in available tests or to
> > do the full truth table on all the filters and use it to generate the
> > correct filterset. There's got to be a better option.
> > --
> > Aaron Davies
> > aaron.davies@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>


-- 
Aaron Davies
aaron.davies@gmail.com

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


Re: Token Filters Questions

Posted by Asaf Mesika <as...@gmail.com>.
I'm not sure I understood your question: How can a filter not exist? Can you
give an example?

On 6/15/06, Aaron Davies <aa...@gmail.com> wrote:
>
> A couple questions on token filters:
>
> First, is there a simple way to directly apply a filtersfile to an
> existing file, i.e. without moving/copying it?
>
> Second, is there an easy way to handle a filtersfile's not existing?
> I'd like to run a file through multiple filters, not all of which will
> actually exist, but the only way I can see to do that right now is to
> either wrap multiple copy-filter statements in available tests or to
> do the full truth table on all the filters and use it to generate the
> correct filterset. There's got to be a better option.
> --
> Aaron Davies
> aaron.davies@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>