gnodet opened a new pull request, #12799:
URL: https://github.com/apache/maven/pull/12799
## Backport of #12737
Cherry-pick of #12737 onto `maven-4.0.x`.
**Original PR:** #12737 - Support the logical not operator in profile
activation conditions
**Original author:** @SEPURI-SAI-KRISHNA
**Target branch:** `maven-4.0.x`
### Original description
Adds handling for the `!` operator to `ConditionParser.parseUnary()`.
The tokenizer already treats `!` as an operator and emits a bare `!` token,
but no parser rule
consumed it. Writing the natural form of a negated condition
(`!exists('some/path')`) failed
with `Unknown variable: !`.
`!` is defined as sugar for the `not()` function that already exists, using
the same
`toBoolean()` coercion. It is handled in `parseUnary()`, giving it the same
precedence as
in Java: tighter than arithmetic, comparison, `&&` and `||`.
`!=` is unaffected -- the tokenizer emits it as a single token before a bare
`!` can be produced.
Fixes #12736
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]