You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Christian Schulte <cs...@schulte.it> on 2016/11/25 13:24:15 UTC

Restore default escaping in maven-resources-plugin?

Hi,

the maven-resources-plugin has enabled escaping by default in version
3.0.0 - see MRESOURCES-223 [1]. Prior to version 3.0.0, users wanting to
make use of any escaping needed to set the 'escapeString' parameter to
some value. This parameter starts to default to the backslash as of
version 3.0.0. This has led to various issues. MRESOURCES-230 [2] and
MRESOURCES-231 [3].

MRESOURCES-230: Can't escape the escape string

I created an issue against maven-filtering - MSHARED-599 [4]. There is a
testcase in maven filtering testing that the escape string does not get
escaped. There is no way to allow escaping the escape string without
updating that test case. Starting to escape the escape string
potentionally breaks filtering resources relying on '\\' (two
backslashes) to be preserved after filtering. In practice, if we "fix"
maven-filtering to support escaping the escape string, properties
resources and any resources using backshlashes themselves for escaping,
will be broken after filtering. That means - there is no way to fix
MRESOURCES-230 [2] and MSHARED-599 [4] without introducing issues
mentioned above.

MRESOURCES-231: Can't disable escaping

Solution to this is to set the 'escapeString' parameter to &empty; to
disable escaping. That means every user upgrading from a
maven-resources-plugin version < 3.0.0 will need to disable escaping, to
get the plugin behave the same way it did before. Users having used
escaping before, will have set the 'escapeString' parameter, so will not
notice anything.

I would like to make a release of the maven-resources-plugin (3.1.0 or
3.0.2?) and make the 'escapeString' parameter default to 'null' again.
WDYT? Users upgrading from < 3.0.0 to > 3.0.1 will not need to do
anything. If they have been using escaping before, they will have set
that parameter already, if they have not been using escaping before,
they will not need to do anything as escaping will no longer be enabled
by default due to the upgrade.


[1] <https://issues.apache.org/jira/browse/MRESOURCES-223>
[2] <https://issues.apache.org/jira/browse/MRESOURCES-230>
[3] <https://issues.apache.org/jira/browse/MRESOURCES-231>
[4] <https://issues.apache.org/jira/browse/MSHARED-599>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Christian Schulte <cs...@schulte.it>.
Am 11/29/16 um 20:01 schrieb Robert Scholte:
> How about no escape character? This also implies that escaping is off by  
> default.

+1

That's what was the default prior 3.0.0. Just revert that and be done
with it.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Robert Scholte <rf...@apache.org>.
How about no escape character? This also implies that escaping is off by  
default.

Robert

On Tue, 29 Nov 2016 06:02:32 +0100, Christian Schulte <cs...@schulte.it>  
wrote:

> Am 11/27/16 um 22:04 schrieb Robert Scholte:
>> Hi,
>>
>> it all depends if the introduced escape character is really a good  
>> default
>> and/or if we should have 2 parameters regarding escaping.
>> I prefer having only 1 parameter and I think that the chosen escape
>> character is not default enough to mark it as _the_ default.
>>
>> just my 2 cents
>> Robert
>
> What character do you have in mind? I though about using some unicode
> character known to not conflict with any escaping mechanism. Like:
>
> U+241B SYMBOL FOR ESCAPE
> U+2410 SYMBOL FOR DATALINK ESCAPE
>
> But that cannot be used with resources not using a unicode capable
> encoding. This maybe needs more thinking in general. Maybe "force" the
> resources to be unicode in the 'src/' folders and provide a way to
> specify a different output encoding, for example. Just reverting to the
> default prior 3.0.0 would make the most sense for now, IMHO.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Christian Schulte <cs...@schulte.it>.
Am 11/27/16 um 22:04 schrieb Robert Scholte:
> Hi,
> 
> it all depends if the introduced escape character is really a good default  
> and/or if we should have 2 parameters regarding escaping.
> I prefer having only 1 parameter and I think that the chosen escape  
> character is not default enough to mark it as _the_ default.
> 
> just my 2 cents
> Robert

What character do you have in mind? I though about using some unicode
character known to not conflict with any escaping mechanism. Like:

U+241B SYMBOL FOR ESCAPE
U+2410 SYMBOL FOR DATALINK ESCAPE

But that cannot be used with resources not using a unicode capable
encoding. This maybe needs more thinking in general. Maybe "force" the
resources to be unicode in the 'src/' folders and provide a way to
specify a different output encoding, for example. Just reverting to the
default prior 3.0.0 would make the most sense for now, IMHO.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Robert Scholte <rf...@apache.org>.
Hi,

it all depends if the introduced escape character is really a good default  
and/or if we should have 2 parameters regarding escaping.
I prefer having only 1 parameter and I think that the chosen escape  
character is not default enough to mark it as _the_ default.

just my 2 cents
Robert

On Sun, 27 Nov 2016 19:44:05 +0100, Karl Heinz Marbaise  
<kh...@gmx.de> wrote:

> Hi,
>
> On 27/11/16 18:34, Hervé BOUTEMY wrote:
>> yes, reverting MRESOURCES-223 seems reasonable since it has drawbacks  
>> that
>> were not envisioned IMHO
>
> Yes this is a problem...
>
> So this should be changed...I think of introducing an option to simply  
> disable escaping...which will keep the behaviour of current 3.X line but  
> gives the freedom to change it if needed...like deactivate escaping in  
> some situations...
>
> Or reverting the change will also be an option...
>
> The idea was having a default value which was often used which  
> unfortunately has the drawback of not being simply to be disabled...the  
> solution "&empty;" looks  hacky ;-( ...so I would introduce an option to  
> disable escaping...
>
>
>
> Kind regards
> Karl Heinz
>
>>
>> Karl Heinz, since you worked on MRESOURCES-223, what do you think about  
>> it?
>>
>> Regards,
>>
>> Hervé
>>
>> Le vendredi 25 novembre 2016, 14:24:15 CET Christian Schulte a écrit :
>>> Hi,
>>>
>>> the maven-resources-plugin has enabled escaping by default in version
>>> 3.0.0 - see MRESOURCES-223 [1]. Prior to version 3.0.0, users wanting  
>>> to
>>> make use of any escaping needed to set the 'escapeString' parameter to
>>> some value. This parameter starts to default to the backslash as of
>>> version 3.0.0. This has led to various issues. MRESOURCES-230 [2] and
>>> MRESOURCES-231 [3].
>>>
>>> MRESOURCES-230: Can't escape the escape string
>>>
>>> I created an issue against maven-filtering - MSHARED-599 [4]. There is  
>>> a
>>> testcase in maven filtering testing that the escape string does not get
>>> escaped. There is no way to allow escaping the escape string without
>>> updating that test case. Starting to escape the escape string
>>> potentionally breaks filtering resources relying on '\\' (two
>>> backslashes) to be preserved after filtering. In practice, if we "fix"
>>> maven-filtering to support escaping the escape string, properties
>>> resources and any resources using backshlashes themselves for escaping,
>>> will be broken after filtering. That means - there is no way to fix
>>> MRESOURCES-230 [2] and MSHARED-599 [4] without introducing issues
>>> mentioned above.
>>>
>>> MRESOURCES-231: Can't disable escaping
>>>
>>> Solution to this is to set the 'escapeString' parameter to &empty; to
>>> disable escaping. That means every user upgrading from a
>>> maven-resources-plugin version < 3.0.0 will need to disable escaping,  
>>> to
>>> get the plugin behave the same way it did before. Users having used
>>> escaping before, will have set the 'escapeString' parameter, so will  
>>> not
>>> notice anything.
>>>
>>> I would like to make a release of the maven-resources-plugin (3.1.0 or
>>> 3.0.2?) and make the 'escapeString' parameter default to 'null' again.
>>> WDYT? Users upgrading from < 3.0.0 to > 3.0.1 will not need to do
>>> anything. If they have been using escaping before, they will have set
>>> that parameter already, if they have not been using escaping before,
>>> they will not need to do anything as escaping will no longer be enabled
>>> by default due to the upgrade.
>>>
>>>
>>> [1] <https://issues.apache.org/jira/browse/MRESOURCES-223>
>>> [2] <https://issues.apache.org/jira/browse/MRESOURCES-230>
>>> [3] <https://issues.apache.org/jira/browse/MRESOURCES-231>
>>> [4] <https://issues.apache.org/jira/browse/MSHARED-599>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

On 27/11/16 18:34, Herv� BOUTEMY wrote:
> yes, reverting MRESOURCES-223 seems reasonable since it has drawbacks that
> were not envisioned IMHO

Yes this is a problem...

So this should be changed...I think of introducing an option to simply 
disable escaping...which will keep the behaviour of current 3.X line but 
gives the freedom to change it if needed...like deactivate escaping in 
some situations...

Or reverting the change will also be an option...

The idea was having a default value which was often used which 
unfortunately has the drawback of not being simply to be disabled...the 
solution "&empty;" looks  hacky ;-( ...so I would introduce an option to 
disable escaping...



Kind regards
Karl Heinz

>
> Karl Heinz, since you worked on MRESOURCES-223, what do you think about it?
>
> Regards,
>
> Herv�
>
> Le vendredi 25 novembre 2016, 14:24:15 CET Christian Schulte a �crit :
>> Hi,
>>
>> the maven-resources-plugin has enabled escaping by default in version
>> 3.0.0 - see MRESOURCES-223 [1]. Prior to version 3.0.0, users wanting to
>> make use of any escaping needed to set the 'escapeString' parameter to
>> some value. This parameter starts to default to the backslash as of
>> version 3.0.0. This has led to various issues. MRESOURCES-230 [2] and
>> MRESOURCES-231 [3].
>>
>> MRESOURCES-230: Can't escape the escape string
>>
>> I created an issue against maven-filtering - MSHARED-599 [4]. There is a
>> testcase in maven filtering testing that the escape string does not get
>> escaped. There is no way to allow escaping the escape string without
>> updating that test case. Starting to escape the escape string
>> potentionally breaks filtering resources relying on '\\' (two
>> backslashes) to be preserved after filtering. In practice, if we "fix"
>> maven-filtering to support escaping the escape string, properties
>> resources and any resources using backshlashes themselves for escaping,
>> will be broken after filtering. That means - there is no way to fix
>> MRESOURCES-230 [2] and MSHARED-599 [4] without introducing issues
>> mentioned above.
>>
>> MRESOURCES-231: Can't disable escaping
>>
>> Solution to this is to set the 'escapeString' parameter to &empty; to
>> disable escaping. That means every user upgrading from a
>> maven-resources-plugin version < 3.0.0 will need to disable escaping, to
>> get the plugin behave the same way it did before. Users having used
>> escaping before, will have set the 'escapeString' parameter, so will not
>> notice anything.
>>
>> I would like to make a release of the maven-resources-plugin (3.1.0 or
>> 3.0.2?) and make the 'escapeString' parameter default to 'null' again.
>> WDYT? Users upgrading from < 3.0.0 to > 3.0.1 will not need to do
>> anything. If they have been using escaping before, they will have set
>> that parameter already, if they have not been using escaping before,
>> they will not need to do anything as escaping will no longer be enabled
>> by default due to the upgrade.
>>
>>
>> [1] <https://issues.apache.org/jira/browse/MRESOURCES-223>
>> [2] <https://issues.apache.org/jira/browse/MRESOURCES-230>
>> [3] <https://issues.apache.org/jira/browse/MRESOURCES-231>
>> [4] <https://issues.apache.org/jira/browse/MSHARED-599>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Restore default escaping in maven-resources-plugin?

Posted by Hervé BOUTEMY <he...@free.fr>.
yes, reverting MRESOURCES-223 seems reasonable since it has drawbacks that 
were not envisioned IMHO

Karl Heinz, since you worked on MRESOURCES-223, what do you think about it?

Regards,

Hervé

Le vendredi 25 novembre 2016, 14:24:15 CET Christian Schulte a écrit :
> Hi,
> 
> the maven-resources-plugin has enabled escaping by default in version
> 3.0.0 - see MRESOURCES-223 [1]. Prior to version 3.0.0, users wanting to
> make use of any escaping needed to set the 'escapeString' parameter to
> some value. This parameter starts to default to the backslash as of
> version 3.0.0. This has led to various issues. MRESOURCES-230 [2] and
> MRESOURCES-231 [3].
> 
> MRESOURCES-230: Can't escape the escape string
> 
> I created an issue against maven-filtering - MSHARED-599 [4]. There is a
> testcase in maven filtering testing that the escape string does not get
> escaped. There is no way to allow escaping the escape string without
> updating that test case. Starting to escape the escape string
> potentionally breaks filtering resources relying on '\\' (two
> backslashes) to be preserved after filtering. In practice, if we "fix"
> maven-filtering to support escaping the escape string, properties
> resources and any resources using backshlashes themselves for escaping,
> will be broken after filtering. That means - there is no way to fix
> MRESOURCES-230 [2] and MSHARED-599 [4] without introducing issues
> mentioned above.
> 
> MRESOURCES-231: Can't disable escaping
> 
> Solution to this is to set the 'escapeString' parameter to &empty; to
> disable escaping. That means every user upgrading from a
> maven-resources-plugin version < 3.0.0 will need to disable escaping, to
> get the plugin behave the same way it did before. Users having used
> escaping before, will have set the 'escapeString' parameter, so will not
> notice anything.
> 
> I would like to make a release of the maven-resources-plugin (3.1.0 or
> 3.0.2?) and make the 'escapeString' parameter default to 'null' again.
> WDYT? Users upgrading from < 3.0.0 to > 3.0.1 will not need to do
> anything. If they have been using escaping before, they will have set
> that parameter already, if they have not been using escaping before,
> they will not need to do anything as escaping will no longer be enabled
> by default due to the upgrade.
> 
> 
> [1] <https://issues.apache.org/jira/browse/MRESOURCES-223>
> [2] <https://issues.apache.org/jira/browse/MRESOURCES-230>
> [3] <https://issues.apache.org/jira/browse/MRESOURCES-231>
> [4] <https://issues.apache.org/jira/browse/MSHARED-599>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org