You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Henric Larsson <He...@igindex.co.uk> on 2008/09/04 10:41:24 UTC

Filtering not correct

Hi,

I've just noticed that filtering doesn't work if the character prefixing
the property reference is a $ (dollar sign).

Example:

pom.xml:

<properties>
      <FOO>BAR</FOO>
</properties>

<build>
 <resources>
   <resource>
     <directory>src/main/resources</directory>
     <filtering>true</filtering>
   </resource>
 </resources>
</build>

src/main/resources/fitlerme.txt - (file to be filtered):

$${FOO}
${FOO}
%${FOO}

Result:

$${FOO} <- Not filtered
BAR
%BAR


Cheers,
Henric



The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc.) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Index plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

Re: Filtering not correct

Posted by Stephen Connolly <st...@gmail.com>.
I should correct that. there are some escapes, and AFAIK the behaviour you
are seeing is by design.

not sure what the exact escapes are... but they should be detailed somewhere

On Thu, Sep 4, 2008 at 9:55 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> that's because $${blah} is an escape for ${blah}
>
>
> On Thu, Sep 4, 2008 at 9:41 AM, Henric Larsson <
> Henric.Larsson@igindex.co.uk> wrote:
>
>> Hi,
>>
>> I've just noticed that filtering doesn't work if the character prefixing
>> the property reference is a $ (dollar sign).
>>
>> Example:
>>
>> pom.xml:
>>
>> <properties>
>>      <FOO>BAR</FOO>
>> </properties>
>>
>> <build>
>>  <resources>
>>   <resource>
>>     <directory>src/main/resources</directory>
>>     <filtering>true</filtering>
>>   </resource>
>>  </resources>
>> </build>
>>
>> src/main/resources/fitlerme.txt - (file to be filtered):
>>
>> $${FOO}
>> ${FOO}
>> %${FOO}
>>
>> Result:
>>
>> $${FOO} <- Not filtered
>> BAR
>> %BAR
>>
>>
>> Cheers,
>> Henric
>>
>>
>>
>> The information contained in this email is strictly confidential and for
>> the use of the addressee only, unless otherwise indicated. If you are not
>> the intended recipient, please do not read, copy, use or disclose to others
>> this message or any attachment. Please also notify the sender by replying to
>> this email or by telephone (+44 (0)20 7896 0011) and then delete the email
>> and any copies of it. Opinions, conclusions (etc.) that do not relate to the
>> official business of this company shall be understood as neither given nor
>> endorsed by it. IG Index plc is a company registered in England and Wales
>> under number 01190902. VAT registration number 761 2978 07. Registered
>> Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised
>> and regulated by the Financial Services Authority. FSA Register number
>> 114059.
>>
>
>

Re: Filtering not correct

Posted by Stephen Connolly <st...@gmail.com>.
that's because $${blah} is an escape for ${blah}

On Thu, Sep 4, 2008 at 9:41 AM, Henric Larsson <Henric.Larsson@igindex.co.uk
> wrote:

> Hi,
>
> I've just noticed that filtering doesn't work if the character prefixing
> the property reference is a $ (dollar sign).
>
> Example:
>
> pom.xml:
>
> <properties>
>      <FOO>BAR</FOO>
> </properties>
>
> <build>
>  <resources>
>   <resource>
>     <directory>src/main/resources</directory>
>     <filtering>true</filtering>
>   </resource>
>  </resources>
> </build>
>
> src/main/resources/fitlerme.txt - (file to be filtered):
>
> $${FOO}
> ${FOO}
> %${FOO}
>
> Result:
>
> $${FOO} <- Not filtered
> BAR
> %BAR
>
>
> Cheers,
> Henric
>
>
>
> The information contained in this email is strictly confidential and for
> the use of the addressee only, unless otherwise indicated. If you are not
> the intended recipient, please do not read, copy, use or disclose to others
> this message or any attachment. Please also notify the sender by replying to
> this email or by telephone (+44 (0)20 7896 0011) and then delete the email
> and any copies of it. Opinions, conclusions (etc.) that do not relate to the
> official business of this company shall be understood as neither given nor
> endorsed by it. IG Index plc is a company registered in England and Wales
> under number 01190902. VAT registration number 761 2978 07. Registered
> Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised
> and regulated by the Financial Services Authority. FSA Register number
> 114059.
>