[
https://issues.apache.org/jira/browse/MNG-7052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280645#comment-17280645
]
Tibor Digana edited comment on MNG-7052 at 2/7/21, 8:01 PM:
------------------------------------------------------------
[~martinkanters]
Having 4.0.0 in comparison with 3.6.x the customer build becomes broken, see
[this|https://github.com/apache/maven-surefire/pull/334]. I do not mind about
the first character if the limitation is there but it is bad if all characters
have such a restriction {{a-zA-Z0-9-_}} and for instance the character "+" is
not in this regex. I have reasonable name of the profile {{jdk9+}} which works
fine with 3.6.3 but I cannot use it in 4.0.0. So I would allow *all* ASCII
characters (except control chars and non visible chars). Do you see having plus
'+' as a conflict with some Maven expressions? Why it was not included in the
default pattern already in 4.0.0?
was (Author: tibor17):
[~martinkanters]
Having 4.0.0 in comparison with 3.6.x the customer build becomes broken, see
[this|https://github.com/apache/maven-surefire/pull/334]. I do not mind about
the first character if the limitation is there but it is bad if all characters
have such a restriction {{a-zA-Z0-9-_}} and for instance the character '+' is
not in this regex. I have reasonable name of the profile {{jdk9+}} which works
fine with 3.6.3 but I cannot use it in 4.0.0. So I would allow *all* ASCII
characters (except control chars and non visible chars). Do you see having plus
'+' as a conflict with some Maven expressions? Why it was not included in the
default pattern already in 4.0.0?
> Do not allow symbols as first character of identifiers in the POM
> -----------------------------------------------------------------
>
> Key: MNG-7052
> URL: https://issues.apache.org/jira/browse/MNG-7052
> Project: Maven
> Issue Type: Improvement
> Components: core
> Reporter: Martin Kanters
> Priority: Major
> Labels: up-for-grabs
> Fix For: 4.0.x-candidate
>
>
> In the {{DefaultModelValidator}} we currently validate identifiers against
> {{a-zA-Z0-9-_.}}
> Since Maven also allows operators to be used against an identifier, this can
> result in bugs or at least unexpected behavior for the user.
> The minus operator can be used to deactivate a certain profile, so an example
> would be:
> - A project having a profile with the id {{-id-of-profile}}
> - A Maven invocation of {{mvn <goal> -P-id-of-profile}}.
> The release of Maven 4 is a nice opportunity to restrict the first character
> of an id to be {{a-zA-Z0-9}} . The other characters may still consist of
> those symbols.
> This should apply to all identifiers that we support. The methods that need
> attention are:
> {{DefaultModelValidator#validateId}} and
> {{DefaultModelValidator#validateIdWithWildcards}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)